Opening a new IE window...


Recommended Posts

Hi,

My problem is I distribute web content on CD-ROM - Currently I have an autorun set that opens the relevent HTML page when the CD is loaded. This then uses JavaScript to load another window on top of that with the toolbars and alike disabled. Problem is I cant close the first window automatically without prompting an error message for the user....

Is there a way of opening the first window from the CD with the toolbars and stuff already disabled (i.e. customised)?

Thanks..

Link to comment
Share on other sites

You can use something like this:

<pre>

<script language=javascript>

window.open('https://www.neowin.net/somepage.html','_blank','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=300,height=150')

window.close ();

</script></pre>

Windows asks for confirmation before closing the window, except if you call this script with a _blank attribute.

So if I have a test.html page with the above code and I would call that like

<pre>

<a href=test.html target=_blank></pre>

then the page would close without confirmation.

I don't exactly know how you open your first html page so ...

ps. you can also use the _self attribute in the above javascript then only one window would be used but the other attributes like 'no scrollbars' would have no effect.

Link to comment
Share on other sites

Thanks for the reply... but still doesn't solve my problem.. looking around I don't think what im asking is possible anyway... oh well... thanks again.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.