You need to sign in to do that
Don't have an account?

Need Browser Compatibility
Hi All,
We need this to be working across all the browsers. Also tried windows.close() & windows.top.close() on line but this code is working only in IE browser & incompatible with Chrome and Firefox.
Also the development mode is also switched off/turned off.
Please advise how to make it work in chrome & Firefox as well.
<apex:page showHeader="false" sidebar="false" tabStyle="Account" >
<apex:form >
<script language="javascript" >
function Confirmation() {
if (confirm("Are you sure you want to close the tab?") == true)
window.top.close()
else
return false
}
</script>
<apex:PageBlock >
<h1 align="center">Thank you for your participation</h1>
<apex:pageBlockButtons location="Bottom" style="align=center" >
<apex:commandButton onclick="Confirmation()" value="Close" />
</apex:pageBlockButtons>
</apex:PageBlock>
</apex:form>
</apex:page>
We need this to be working across all the browsers. Also tried windows.close() & windows.top.close() on line but this code is working only in IE browser & incompatible with Chrome and Firefox.
Also the development mode is also switched off/turned off.
Please advise how to make it work in chrome & Firefox as well.
<apex:page showHeader="false" sidebar="false" tabStyle="Account" >
<apex:form >
<script language="javascript" >
function Confirmation() {
if (confirm("Are you sure you want to close the tab?") == true)
window.top.close()
else
return false
}
</script>
<apex:PageBlock >
<h1 align="center">Thank you for your participation</h1>
<apex:pageBlockButtons location="Bottom" style="align=center" >
<apex:commandButton onclick="Confirmation()" value="Close" />
</apex:pageBlockButtons>
</apex:PageBlock>
</apex:form>
</apex:page>
I have test the above code in my developer org. This code perfectly working in IE,Chorme,Firefox. Please make sure some of the following consideration, If stil facing issue let me know.
1. Make sure always use Stable version Browser( both Firefox, chrome) i.e Don't Use Beta or Dev versions, If possible please update your browser.
2. If you disabled javascript in your browser means it will not work, so check the following,
http://activatejavascript.org/en/instructions/chrome
http://mistered.us/tips/javascript/firefox.shtml
Please try it with the site * Chrome or Firefox browser.