Here in the below code when i click commandbutton(test() function) js function is getting called and after that page is getting refreshed and it is not calling the action function method. {!redirectSSO} method is not even getting called. Below is the vf page code:
<script>
function test(){
var ste = new URL(top.frames["ifrm"].location.href).searchParams.get('state');
console.log('st value--> '+ste); //printing
console.log('hello'); //printing
callContollerMethod(); // After this page is refreshed, action function method is not called
}
</script>
<apex:outputPanel id="tstpopup566" rendered="{!showIframe}" >
<apex:iframe id="ifrm" src="{!embedUrl}" scrolling="false" width="50%" height="40px" />
</apex:outputPanel>
<apex:commandButton rerender="none" onclick="test()" value="{!$Label.PP_SaveContinue}"
id="saveButton" />
<apex:actionFunction name="callContollerMethod" action="{!redirectSSO}" >
</apex:actionFunction>
Apex:
public PageReference redirectSSO() {
PageReference pr = new PageReference('https://www.google.com');
return pr;
}