function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MoseenMoseen 

Apex code

hi,

 

i want to keep a button called submit, if the user hits the button . it wont be live for next time if he clicks.

 

pls help me out to over come this problem...

Navatar_DbSupNavatar_DbSup

Hi,

 

Try the below code sample:

<apex:page id="p" >
<script>
function disablebutton()
{
alert('hello');
document.getElementById('p:f:cmd').disabled=true;
}
</script>
<apex:form id="f" >
<apex:commandButton onclick="disablebutton()" id="cmd" value="clickme"/>

</apex:form>
</apex:page>

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.