+ Start a Discussion
SF DEVSF DEV 

How to close firefox current parent tab on clicking commandbutton using javascript

Unable to close firefox current tab using javascript

using Window.top.close(), workinginchrome and IE not in firefox.
Is there way to close tab in forefox usingjavascript?
<apex:commandButton onClick="window.top.close();"   value="Cancel"/>
                
pconpcon
It seems that the Fireforx API for this is just window.close();

https://developer.mozilla.org/en-US/docs/Web/API/Window/close