THE EFFECT
Click here to view the effect. You will notice that as soon as you click either of the buttons, the button is greyed out and its text is changed to “Submitted…”
STEP 1
Create a button of type “Create a button in a region position”.
STEP 2
Set the button’s target to be a URL.
STEP 3
If you do not want a confirm dialog with the button, set the button’s URL target to the following:
javascript:this.disabled=true;
this.value='Submitted...';
doSubmit('XXXXXX');
If you DO want a confirm dialog with the button, set the button’s URL target to the following:
javascript:if (confirm('Are you sure you want to?')) {
this.disabled=true; this.value='Submitted...';
doSubmit('XXXXXX');
}
In either case you should change the value of XXXXXX to be the same as the name of the button. This is the value that REQUEST will be set to when the button is clicked. By setting it to be the same as the name of the button it means that you can still use “When Button Pressed” conditions for this button.
Click here to view the effect. You will notice that as soon as you click either of the buttons, the button is greyed out and its text is changed to “Submitted…”
STEP 1
Create a button of type “Create a button in a region position”.
STEP 2
Set the button’s target to be a URL.
STEP 3
If you do not want a confirm dialog with the button, set the button’s URL target to the following:
javascript:this.disabled=true;
this.value='Submitted...';
doSubmit('XXXXXX');
If you DO want a confirm dialog with the button, set the button’s URL target to the following:
javascript:if (confirm('Are you sure you want to?')) {
this.disabled=true; this.value='Submitted...';
doSubmit('XXXXXX');
}
In either case you should change the value of XXXXXX to be the same as the name of the button. This is the value that REQUEST will be set to when the button is clicked. By setting it to be the same as the name of the button it means that you can still use “When Button Pressed” conditions for this button.
No comments:
Post a Comment