Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Window.Open Question

Status
Not open for further replies.

codeWarrior456

Technical User
Oct 27, 2002
27
US
Can someone show me how to use the window.open function with VBscript and a hyperlink? I've read through the documentation on Microsoft's site, but for some reason I can't get it to work. Thanks for the help.
 
Here's the javascript for it:
Code:
function Start(page) {OpenWin = this.open(page, 'CtrlWindow', 'toolbar=no,menubar=no,location=no,scrollbars=yes,resizabable=no,width=775,height=500');}

then in the a tag,
Code:
href=javascript:Start(page.html)

That being said, using pop-up windows is typically not a good idea. If your users don't have the scripting language your useing enabled in their browser, they lose the content that you want to show them with the link. Moreover, if you do have to do, please provide a message that says "will open in new window" so they don't think their "back" button is broken, and they don't close it thinking it's a pop-up add.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top