using asp.net, code behind has Response.Write("<script> window.opener=self ; window.close(); </script>"); that works both internal browser and IE, but ignored in Firefox. Why ?
I am using 'Microsoft Visual Studio 2008' Professional Edition, and I use 'Firefox version 5.0'. ( Firefox browser informs me I am using the lsatest version, when I choose 'Help' - 'About Firefox')
My Button ('btClose') is the ONLY object present on my Web Page. Code behind file reads :
======= ======
protected void btClose_Click(object sender, EventArgs e) { Response.Write("<script> window.opener=self ; window.close(); </script>"); }
======= ======
EVERYTHING works as planned - using either (*) Visual Studio's internal browser
- OR -
(*) Internet Explorer
Click 'Close' button - it posts a confirm box, & success !!
BUT - browsing via Firefox - nothing bad happens - NOTHING !
Its as if Firefox doesn't run scripts .
Please let me know what to do.
Sincerely
Ray Grant ( RGrant41@aol.com)
すべての返信 (1)
You can only close windows via window.close() that were previously opened via JavaScript