Command button with oncomplete attribute does not work when development footer is Enabled.
<apex:page controller="google_redir">
<apex:form>
<apex:commandButton action="{! hello1}" value="button 1"/>
<apex:commandButton action="{! hello1}" value="button 2" oncomplete="alert('onComplete called');" reRender="here"/>
<apex:outputPanel id="here">{!NOW()}</apex:outputPanel>
</apex:form>
</apex:page>
Controller:
public class google_redir{
public PageReference hello1(){
PageReference reference=new PageReference('https://www.google.com');
reference.setRedirect(true);
return reference;
}
}
Error which I get in chrome console
Refused to display 'https://www.google.co.in/?gfe_rd=cr&ei=1MpEVKi4MaXV8gf18YGACw' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. TestPage?core.apexpages.devmode.url=1:1 Uncaught SecurityError: Sandbox access violation: Blocked a frame at "https://c.ap1.visual.force.com" from accessing a frame at "https://c.ap1.visual.force.com". The frame being accessed is sandboxed and lacks the "allow-same-origin" flag. VFDevModeWithViewstate.js:21 Uncaught SecurityError: Failed to read the 'cookie' property from 'Document': The document is sandboxed and lacks the 'allow-same-origin' flag.