...

View Full Version : location.href to a New Window



peterinwa
01-24-2006, 11:05 PM
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

MetalStorm
01-24-2006, 11:45 PM
Try looking up JavaScript's window.open(); method. :)

peterinwa
01-25-2006, 12:00 AM
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/showthread.php?p=358196#post358196

Thanks, Peter



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum