How to get to a new window through hyperlink

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
binoy3012
Forum Newbie
Posts: 4
Joined: Tue May 13, 2003 1:49 am

How to get to a new window through hyperlink

Post by binoy3012 »

hi!
i'm new with php,so just trying to work with it. I have a problem with this code:

echo "<a href=\"second.php\" >click here.</a><br />";

I want the 'second.php' page to open in a new window.Can anyone tell me what changes should i make so that when i click on 'click here', the second.php page should open in a new window.

thanks,
binoy
will
Forum Contributor
Posts: 120
Joined: Fri Jun 21, 2002 9:38 am
Location: Memphis, TN

Post by will »

set the target of the anchor to "_blank"

Code: Select all

<a href="page.html" target="_blank">click me</a>
binoy3012
Forum Newbie
Posts: 4
Joined: Tue May 13, 2003 1:49 am

Post by binoy3012 »

Thank you Will!
i was setting it as target=new.

thanks anyway!
binoy.
Post Reply