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

open a new "_blank" page w/a specified size and position 2

Status
Not open for further replies.

leegold2

Technical User
Oct 10, 2004
116
Using the code:

<a href="details.php?id=6" target="_blank">NEPP</a>

There's php in the mix but I think this is an html question. The page opens directly on top and exactly the same size as the parent.

Is there an html or css way to get the _blank page to open with a specificed size and position . ie. smaller and to the side so the parent's not obscurred.

Thanks,
Lee G.
 
Code:
<a href="#" onClick="window.open('details.php?id=6','myNewWindow','top=20,left=20,width=800,height=600'); return false;">NEPP</a>

Tony
________________________________________________________________________________
 
Better like this:
Code:
<a href="details.php?id=6" target="_blank"  onClick="window.open(this.href,'myNewWindow','top=20,left=20,width=800,height=600'); return false;">NEPP</a>
That way, visitors with Javascript switched off (the Google spider, for example) will still be able to follow your link, albeit without the sizing & positioning (that are only possible with Javascript).

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
So what I want to do is only possible with scripting? That's OK as long as people w/scripting turned-off can get the content as well...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top