+ Start a Discussion
gv007gv007 

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.. :)
gv007gv007
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.