Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Learn More

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 ?

  • 1 odpoveď
  • 8 má tento problém
  • 2 zobrazenia
  • Posledná odpoveď od cor-el

more options

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)

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)

Všetky odpovede (1)

more options

You can only close windows via window.close() that were previously opened via JavaScript