faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

20 of 25 people (80%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Once a URL is loaded into a browser window, how to prevent a shortcut being loaded into this window?

Mar 30th, 2000 01:30
Martin Honnen, Dave Elstner,


You should check whether DDE settings for the application allow to 
prevent the browser from resusing a window and to force it to open a 
new instead.
Client side JavaScript provides the 
  <BODY ONUNLOAD
handler in NN and IE which would allow you to open a new window with 
your existing page:
  <BODY ONUNLOAD="open(location.href)">
and IE provides the 
  <BODY ONBEFOREUNLOAD="event.returnValue = 
                        'Are you sure you want to leave?';">
handler which will popup a confirmation dialog before a new page is 
loaded.