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 01-24-2006, 11:05 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
location.href to a New Window

I use this code to create a banner that contains text:

<table onClick='location.href="URL"' onMouseOver='this.style.cursor="pointer"'><tr><td>text of banner...

because it makes the whole banner a link. If I do it this way:

<table><tr><td ><a href='http://URL' target='_blank'>text of banner...

only the text is the link and if someone puts their cursor over a non-text area they might no realize they can click on it.

In the second example, however, I use target='_blank' to open up a new window.

My question is, is there a way to use the first method and open a new window.

Thanks, Peter
peterinwa is offline   Reply With Quote
Old 01-24-2006, 11:45 PM   PM User | #2
MetalStorm
New Coder

 
Join Date: Jul 2002
Location: UK
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
MetalStorm is an unknown quantity at this point
Try looking up JavaScript's window.open(); method.
MetalStorm is offline   Reply With Quote
Old 01-25-2006, 12:00 AM   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
Sorry, I should have mentioned that.

I can't use the word "open" in my JS pages because Symantec's anti-ad software will insert JS coding into them and break them:

http://www.codingforums.com/showthre...196#post358196

Thanks, Peter
peterinwa 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 02:23 AM.


Advertisement
Log in to turn off these ads.