Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-07-2004, 10:27 PM   PM User | #1
peterinwa
Regular Coder

 
Join Date: Jun 2002
Location: Vancouver, WA
Posts: 233
Thanks: 2
Thanked 0 Times in 0 Posts
peterinwa is an unknown quantity at this point
Simple window.open Question

This code is opening the url in a new window just as I want, but leaving the old window blank except for the message [object] in it.

<a href="javascript:window.open('http://www.xxx.com')">Click Here to Open New Window</a>

Thanks, Peter
peterinwa is offline   Reply With Quote
Old 07-07-2004, 10:46 PM   PM User | #2
jamescover
Regular Coder

 
Join Date: Aug 2002
Location: USA
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
jamescover is an unknown quantity at this point
<a href="javascript:window.open('http://www.www.com');void(0);">Click Here to Open New Window</a>

That just opens a default page...that being the case, why don't you just use a standard anchor...?

Maybe, you can use this:


http://www.ekigroup.com/javascript/winGen.html


-james
__________________
"God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "

Last edited by jamescover; 07-07-2004 at 10:53 PM..
jamescover is offline   Reply With Quote
Old 07-07-2004, 11:02 PM   PM User | #3
peterinwa
Regular Coder

 
Join Date: Jun 2002
Location: Vancouver, WA
Posts: 233
Thanks: 2
Thanked 0 Times in 0 Posts
peterinwa is an unknown quantity at this point
I'm not sure what you're saying. Don't know what you mean by standard window... but I don't care about the dimensions. I just don't want it to open in MY window and replace my site.

Elsewhere I use this code and it works fine:

if (V==1222){window.open('http://www.xxx.com/')}

But I want it to be in an href statement.

(Of course the real url isn't xxx.)

Thanks, Peter
peterinwa is offline   Reply With Quote
Old 07-07-2004, 11:07 PM   PM User | #4
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
Try searching this forum.
There are hundreds of popup scripts and/or examples which show how to do what you are asking...
Willy Duitt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:15 AM.


Advertisement
Log in to turn off these ads.