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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change an URL and open a new window

Status
Not open for further replies.

zrazzaq

MIS
Apr 13, 2005
102
US
Hi all:
I wanted to know is there a way to change the url and redirect the existing page to one site and at the same time open a new window with a different url..
Thanks
Zishan
 
Code:
<script type="text/javascript">

function doIt() {
   window.open("[URL unfurl="true"]http://www.google.com");[/URL]
   document.location = "[URL unfurl="true"]http://www.yahoo.com";[/URL]
}

</script>
<input type="button" onclick="doIt()" value="click me" />

-kaht

Looking for a puppy? [small](Silky Terriers are hypoallergenic dogs that make great indoor pets due to their lack of shedding and small size)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top