portal123
asked on
window.close() do NOT work on FireFox..
I used the following code to close window. It works on I.E, but not FireFox. How can I resolve a problem??
<FORM>
<INPUT TYPE="button" VALUE="LogOut" onClick="window.close()">
</FORM>
<FORM>
<INPUT TYPE="button" VALUE="LogOut" onClick="window.close()">
</FORM>
its a security issue with FF you cant close a window except it is a pop-up window (that opened by window.open method)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I tried the above code.. it is not working for FF.........
window.close(); works for only pop-up windows..
Thanks
Bhanu Prakash
window.close(); works for only pop-up windows..
Thanks
Bhanu Prakash
As far as I tested, easiest way to close window for most browsers (including ff2 & ff3, without need for changing browser conf.) is this:
<input type="button" name="Close"
onclick="window.opener = window.self; window.close();" />