homepage Welcome to WebmasterWorld Guest from 54.161.155.142
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
js window.open()
Can't get it to work
Birdman




msg:1491743
 3:01 pm on May 4, 2002 (gmt 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!

 

txbakers




msg:1491744
 3:05 pm on May 4, 2002 (gmt 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.

Birdman




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

Thanks again txbakers! You hooked me up yesterday too. Gotta love WW.

Birdman




msg:1491746
 3:18 pm on May 4, 2002 (gmt 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>

tedster




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

The second argument is the window name - it should not contain a space. Use something like 'shipping_details'

joshie76




msg:1491748
 11:48 am on May 5, 2002 (gmt 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.

DrDoc




msg:1491749
 4:25 am on May 6, 2002 (gmt 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');">

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved