Questions tagged [commandbutton]

A button that is rendered as an HTML input element with the type attribute set to submit, reset, or image, depending on the <apex:commandButton> tag's specified values. The button executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action.

Filter by
Sorted by
Tagged with
6
votes
2answers
1k views

How does default command button of VF page work?

I created a wizard on VF page. Each step of the wizard has "back" and "next" buttons except for the first step which has only "next" button. When I was on the first step's page and pressed the enter ...
1
vote
1answer
1k views

Command button not getting display on Vf page

I have create a command button on vf page. But Command button not getting display on Vf page. My code <apex:page controller="testpopup"> <apex:form> <apex:pageBlock> ...
4
votes
1answer
265 views

How to trigger an apex:actionFuction from an apex:commandButton without a page refresh?

How can I add an apex:commandButton to a page doing the following: Executing an apex:actionFunction ReRendering some parts of the page (with reRender="") NOT redirect to another page / refresh actual ...
0
votes
2answers
8k views

Visualforce page - run javascript when clicking button

This is the first Visualforce page I am creating, so this might be a very simple question. Previously I had a custom button on a custom object and I set behaviour to "execute javascript" and content ...
3
votes
1answer
645 views

Visualforce: Two apex:commandButtons, one is for custom task creation. The other can't submit correctly because of task's required fields

So I have an odd issue where I have two apex:apex:commandButtons on the same page. One load's some data, and the other creates a new task. The new task action works great, but the load data button can'...
1
vote
1answer
2k views

commandButton target

Does the commandButton have anything similar to a target attribute for outputLink? I am needing such a thing because I have a visualforce page that is inline or an iFrame for an Account or Contact ...
1
vote
1answer
138 views

Custom buttons to ask for data

So I want to design a button that when pushed would bring up a small pop up window that would ask for input from the user. I would prefer to make this input a selection from a drop down menu. Then I ...
1
vote
0answers
241 views

Cancel with confirm message requires double click

I have a simple example of a custom controller and a VF page. I have a cancel button on the VF page that shows a confirmation message to save unsaved data before leaving the page. When I click on ...
0
votes
1answer
685 views

Toggle Command Button Value from Ascending to Descending

I have a command link Ascending. If I click on the link, immediately, the value of the button/link should change to Descending. <apex:commandLink action="{!Asc}" value="Ascending" reRender="block"...
3
votes
0answers
916 views

apex:actionFunction action doesn't seem to work the same as apex:commandButton action

I am trying to override a custom object new and edit actions with a simple visualforce page. The desire is to not need a custom controller and just use the standard controller methods. <apex:page ...
0
votes
1answer
825 views

Image is not displaying on the command button instead displayed “Submit Query”. What could be the issue?

I tried to display the command button as an image button and for that, i have added image attribute to the button and used a gif from static resource. I have used the following html to achieve this, ...
0
votes
2answers
577 views

CommandButton not working for Site Guest User

I have two pages and one controller all enabled for Site Guest Profile. On page A I have an apex:form with a commandButton; clicking on the button redirects to page B. All is working well for an ...
0
votes
3answers
4k views

How to change attribute value in javascript

<apex:commandButton value="Default View" action="{!showlist}" styleClass="input" id="hide1" disabled="true"/> <apex:commandButton value="Quote List" action="{!view}" styleClass="input" ...
9
votes
2answers
27k views

Calling apex:actionFunction on apex:commandButton's onclick event

Can we call apex:actionFunction on apex:commandButton's onclick event? Actually i am trying to do this but controller's method is not being called. i am doing something like below - <apex:...
1
vote
2answers
12k views

Form reset after clicking a button?

vf page: <apex:page> <apex:form> <apex:inputtext value={!Value}/> <apex:commandButton value="Reset" onclick="this.form.reset();return false;" /> <apex:...
1
vote
4answers
3k views

How to reset the form using JavaScript? [closed]

<apex:page id="page1"> <apex:includeScript value="{!URLFOR($Resource.JqueryA, 'js/jquery-1.6.2.min.js')}"/> <apex:includeScript value="{!URLFOR($Resource.JqueryA, 'js/jquery-ui-1.8.16....
1
vote
2answers
972 views

disable save button in page for particular stage

Hey guys look at my scenario I have a stages(picklist field) in custom object. Requirement is i have to enable my save button only when the stage is 'completed' if the stage is other than 'completed' ...
3
votes
3answers
493 views

jquery mobile commandbutton

Could use your help: I'm trying to use JQuery Mobile within Salesforce. I've run into a problem where CommandButtons don't work. I've put together a basic example of this below. If you simply remove ...
6
votes
1answer
1k views

Setting controller variables not reliable from apex:commandButton

I'm trying to set a variable inside my controller via an actionFunction, which is called by some Javascript, which is initially called by either by an actionPanel (with styleClass='btn') or a ...
1
vote
1answer
311 views

How to break a standard action on a visualforce page? [duplicate]

In my vf page, there is a save button that of standard vf command button. A JS confirm will popup when someone click this button. Now, if user has chosen cancel, I want to cancel the action of save. ...
6
votes
2answers
7k views

Command button and Action Function

I want the action function to be called when command button is clicked which calls an apex class. The debug log is shoing everthing working fine but the page is not redirected. <apex:form > &...
0
votes
1answer
450 views

Command Button timeout parameter: maximum value

I am using a apex:commandButton with a timeout parameter. What maximum value can i use for the timeout? In the doc there is no clear description about that: The amount of time (in milliseconds) ...