• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

Opening a new IE window...

Question

digital_fire    0

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..

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Redmak    356

You can use something like this:

<pre>

<script language=javascript>

window.open('http://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.

Share this post


Link to post
Share on other sites
  • 0
digital_fire    0

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.