Pesquisar no site de suporte

Evite golpes de suporte. Nunca pedimos que você ligue ou envie uma mensagem de texto para um número de telefone, ou compartilhe informações pessoais. Denuncie atividades suspeitas usando a opção “Denunciar abuso”.

Saiba mais

Esta discussão foi arquivada. Faça uma nova pergunta se precisa de ajuda.

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 resposta
  • 8 têm este problema
  • 2 visualizações
  • Última resposta de 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)

Todas as respostas (1)

more options

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