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
kannapapikannapapi 

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>
Arunkumar RArunkumar R
Hi,

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


kannapapikannapapi
@ Arun : Please try hosting this page on a site & test it . The javascript does not work with the Site on firefox or Chrome. The page if hosted on site & if the button is clicked in IE browser , the page gets closed.   
Please try it with the site * Chrome or Firefox browser.