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

oncomplete not working in command button

<apex:commandButton id="btn" value="Search" action="{!method}"  oncomplete="onCompleteRefresh();"
                                  onClick="loading();" reRender="frm" />

while I am clicking on the command button oncomplete not invoking javascript function.there is any other way to handle it.
Rohit B ☁Rohit B ☁
I guess you are reRendering whole form, right? If you are doing so then it won't work in your case.
You have to reRender only specific component not all form or in other words you need to reRender components apart from this button. This button should not be included in reRender process.

Hope it helps.. :)
for your information.I have around 3000 k VF page code is there .It is working in prod and other sandboxes .It was not kicking moving into unrelated sandbox.

As per my understanding reRender and oncomplete cont be used at a time.but it is working pas 4 four year in diffrent sandboxes and still working

based on my debug oncompte java script not kicking.