Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applying the target property to location.href.....???

Status
Not open for further replies.

GregLanders

Programmer
Jul 9, 2001
17
US
How do you apply the target property to a location.href?

Code:
document.location.href="[URL unfurl="true"]http://www.domain.com";[/URL]

Such as _blank or _top.
 
In case of _top try this:
Code:
top.document.location.href="www.domain.com"

If you want to reference another frame in frameset:
Code:
top.frameName.location.href="www.domain.com"

For _blank you should use a function that opens new window: [tt]window.open()[/tt]. In case you want to specify the attributes of new window, you can use something similar to the script posted here: thread216-227924

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top