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
rajsrajs 

Action Status does not call the javascript function

In my visual force page,I am using <apex:actionstatus> and i assign two different JavaScript function to 'onstart' and 'onstop' attribute of actionstatus.onstart function is working fine but onstop function is not working well.
 
My sample code:
Code:
<apex:page Standardcontroller="Contact">
 <apex:form >
  <apex:pageBlock title="Calculated Lighting Measures" mode="edit" id="page">
   <apex:pageBlockButtons location="bottom">
    <apex:commandButton value="  Save  " action="{!Save}"  id="Sve"/>
    <apex:commandButton value="Cancel " action="{!Cancel}" />
    <script>
    function Btndisable()
    {
     alert("Hi");
    }
    function Btnenable()
    {
     alert("Hell0");
    }
    </script>
   </apex:pageBlockButtons>
   <apex:pageBlockSection columns="1" title="Information" id="info" >
    <apex:inputfield value="{!Contact.Picklist__c}">
     <apex:actionSupport event="onchange"  status="ActionStatus"  />
    </apex:inputfield>
    <apex:actionStatus id="ActionStatus" startText="Please Wait" onstart="BtnDisable()" onstop="BtnEnable()" ></apex:actionStatus>
   </apex:pageBlockSection>
  </apex:pageBlock>
 </apex:form >
</apex:page>               
              

 

 
Can any one help me to find , where i made mistake
 
Raj
CarcajouCarcajou
Hi Raj,

for me none of the 2 functions are working.
The main reason is that you defined the function with "Btndisable" but then call the function with "BtnDisable".
If you use the same name, it should work. At least it did for me.

Catherin.
rajsrajs
Hi Carcajou
          Sorry,I made a mistake when i post a sample code.
even i use Btndisable()  and Btnenable().then Btnenable() is not working.
 
Thanks
Raj