You need to sign in to do that
Don't have an account?
krish99
HOW TO ENABLE THE JAVASCRIPT BUTTON
Hi,
i am using button when i click on it means it is disabling after some time how can i enable the button automatically
2. When page reloads means how button automatically enable
IS it on standard page? then it will depend on your page layour
if it is on visualforce page then you need to see if it has has been disabled by any boolean variable...
it is in visualforce page.
once i click on the button it will be disable state.
After some specified button should be automatically enable.
how can i achieve this..
You can use "disabled" attribute of command button to enable or disable it by binding a boolean varibale ot it... Hit kudos and mark as answer if it helps you.
Can U send me some sample code..
sample code:
VF Page:
<apex:page controller="vfpage3" >
<apex:form id="formid">
<apex:actionFunction name="enableagain" action="{!enable}" reRender="formid"/>
<apex:commandButton id="cmdId" value="submit" disabled="{!disabled}" action="{!disable}" reRender="formid" oncomplete="alert('enableagain');enableagain()"/>
</apex:form>
</apex:page>
Apex controller:
public class vfpage3 {
public vfpage3 (){
disabled = false;
}
public boolean disabled{get;set;}
public void enable(){
disabled = false;
//task to be performed on button click
/*****
***/
}
public void disable(){
disabled = true;
}
}