Not a Member Yet,
Click here to Register
How do you like the new design?
It's cool, great job
[tally: 70%] 70%
It's okay
[tally: 20%] 20%
Its OK but I liked the old layout better
[tally: 0%] 0%
Please bring the old one back
[tally: 10%] 10%

votes: 10

ID: 67
Viewed: 3273
Added: Jan 29, 2002
Snippet uploaded by: snippet
Written By: Unknown
Demo: Sorry, no demo

User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

One window sometimes just isn't enough. For instance, you might want to create a window as a secondary navigation aid. Pop-up windows are straightforward to make with the method.

This method takes four optional parameters:

Location specifies the URL of the document to show within the new window. If it's left blank, the "about:blank" document (a blank document) is displayed.

Name specifies the name of the new window.

Options is a single string containing a series of comma-delimited parameters that specify how the new window will look.

Replace history item, if set to true, won't add a new history item to the browser's history list as a result of the window opening.

The following example shows how you can both open and close a navigation window from an HTML page.

<SCRIPT language="vbscript"> 

'Dim a local variable to hold a reference to the new window.
Private oNavWin

Function OpenNavWindow()
'Call the open method and assign the resultant window reference to your local variable.
Set oNavWin ="nav.html","navwindow", _
"height=150,width=250, _
status=yes,toolbar=no, _
'Pass a reference to this window to the new window.
Set oNavWin.opener = self
End Function

Function CloseNavWindow()
'Handle an error, just in case the
'window has already been closed!
on error resume next
'Close the window.
'Release the object reference.
Set oNavWin = Nothing
End Function



<H2>Main window</H2>
<input type="button" name="cmdClose" onClick="CloseNavWindow" value="Close navigation window">
<input type="button" name="cmdOpen" onClick="OpenNavWindow" value="Open navigation window">

No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.

Replying to a Comment...

Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 All Rights Reserved. Conditions