[thelist] _target= opening new window parameters?

aardvark roselli at earthlink.net
Sun Apr 14 21:33:01 CDT 2002


> From: "Hugh Blair" <hblair at hotfootmail.com>
>
> <a href="../info.html" target="_blank" ????????????>
>
> OK - I'm lost. I can't find the other attributes for this
> tag, like: size, position, chrome,

that kind of control isn't available through the target attribute... you need to
use scripting to access that level of control on a new window... so, for
example, you might have script like this on your page (watch for wrap):

<script language="javascript" type="text/javascript">
	function HughWindow() {
		newWindow =
window.open("../info.html","WinName","toolbar=no,location=no,scrollbars=yes,
width=400,height=500");
	}
</script>

and then you'd call that thusly (which ensures those without JS enabled will
still see the page view just a new window, but at least they'll see it):

<a href="../info.html" target="_blank"
onClick="javascript:HughWindow();return false;">

you'll get a lovely window with no toolbar, no location bar, scrollbars enabled,
a width and height as specified, and it won't move the user to the top of the
page firing the window, either...

you can see more about the lovely mix of JS and HTML that allows for
pleasant degradation across all users in a lovely article by .jeff:

Links & JavaScript Living Together in Harmony
http://evolt.org/article/list/17/20938/




More information about the thelist mailing list