Strange: Response.Write("<script>window.open(' ...')</script>") doesn't work on IE 5.0

  • Thread starter Thread starter Jorge_Beteta
  • Start date Start date
J

Jorge_Beteta

Hello,

I'm programming in ASP.NET

I don't understand this: I try to open a window in an IE 5.0, showing
a PDF file using this address:
http://MyWebSite/Documentos/MyFile.pdf

This instrucction:
Response.Write("<script>window.open('Documentos/MyFile.pdf',null,'menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=yes')</script>")

doesn't work on every IE 5.0. In some of them works fine. In others,
it doesn't.
As I said, there are some IE 5.0 where there can't open a window
showing the PDF file. It even doesn't show any error.
However, using a Java program, it allways can open a window showing
the same PDF file on every IE 5.0 using the same address:
http://MyWebSite/Documentos/MyFile.pdf

Any ideas what is happening?
Thank you!
 
If the user has disabled JavaScript on IE, then your script will never run.
As it is a per-user setting, you should provide an alternative for this
eventuality. Use the <noscript> tag, and include a static link to the
document for those who have scripting disabled.
 
Jorge_Beteta said:
Hello,

I'm programming in ASP.NET

I don't understand this: I try to open a window in an IE 5.0, showing
a PDF file using this address:
http://MyWebSite/Documentos/MyFile.pdf

This instrucction:
Response.Write( said:
")

doesn't work on every IE 5.0. In some of them works fine. In others,
it doesn't.
As I said, there are some IE 5.0 where there can't open a window
showing the PDF file. It even doesn't show any error.
However, using a Java program, it allways can open a window showing
the same PDF file on every IE 5.0 using the same address:
http://MyWebSite/Documentos/MyFile.pdf

Any ideas what is happening?
Thank you!

Pop-up blocker active that removes/deactivates the window.open?
 
Back
Top