Welcome to WebmasterWorld Guest from 54.224.148.71

Forum Moderators: open

Message Too Old, No Replies

js window.open()

Can't get it to work

     
3:01 pm on May 4, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


Could anyone tell me why this window will not open up for me. I formatted it exactly how it was shown on a Goodies tutorial, but it just reloads the same page. Here's the line:

<a class="bodylink" href="bvc001.html" onClick="window.open('http://www.mysite.com/tiaras.html','Shipping details', config='height=300,width=300')">click here.</a>

Appreciate the help!

3:05 pm on May 4, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0



1) remove the word "config" from your features section of the function.

2) You wouldn't need the link in the href section. You can use a href="#" . Generally the onClick will override the href link, but it never hurts to be sure.

Other than that it should work.

3:10 pm on May 4, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


Thanks again txbakers! You hooked me up yesterday too. Gotta love WW.
3:18 pm on May 4, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 22, 2002
posts:2546
votes: 0


Now I'm getting error "invalod arguement"

<a class="bodylink" href="#" onClick="window.open('http://www.mysite.com/tiaras.html','Shipping details','height=300','width=300')">click here.</a>

3:46 pm on May 4, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


The second argument is the window name - it should not contain a space. Use something like 'shipping_details'
11:48 am on May 5, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 10, 2001
posts:793
votes: 0


also your window features should be passed as a single string parameter:

<a class="bodylink" href="#" onClick="window.open('http://www.mysite.com/tiaras.html','Shipping_details','height=300,width=300')">

Make sure you don't have a space in the features string (blue above) or it won't work in NN4.

4:25 am on May 6, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


Even better is to do this:

<a class="bodylink" href="javascript:window.open('http://www.mysite.com/tiaras.html','Shipping_details','height=300,width=300');">