[prev in list] [next in list] [prev in thread] [next in thread]
List: web4lib
Subject: [WEB4LIB] Re: Netscape New Window size
From: tdowling () ohiolink ! edu (Thomas Dowling)
Date: 2000-07-31 8:41:40
Message-ID: 00d501bffaec$cd2df430$761e99c0 () ohiolink ! edu
[Download RAW message or body]
[Insert standard caveats about why and when to open new windows at all.]
To answer the original question, 'target="_blank"' will not take any
sizes for the new window.
> ...this is the link that calls up the function
>
> <a href="javascript:openinf('http://www.whatever.com', 'title
of new window')">
>
> for more information try one of the following sites, though there are
of course others:
>
> http://webreference.com
> http://www.javascript.com
> http://www.webcoder.com
> http://www.webmonkey.com
>
Here's a rebuttal:
http://www.w3.org/TR/1999/WAI-WEBCONTENT-19990505/#gl-new-technologies
The problem with this approach is that it absolutely breaks the link for
anyone working without JavaScript. It's less likely to cause
accessibility problems if client-side scripting is used to tweak
standard links. You could try something like this:
=========
<script type="text/javascript"><!--
function openWin() {
newWin =
window.open("","MyNewWindow","menubar=yes,scrollbars=yes,toolbar=yes,res
izable=yes,width=300,height=300");
}
</script>
<a href="http://www.yahoo.com"
target="MyNewWindow"
onClick="openWin()">Yahoo in an explicitly sized window.</a>
=========
With a little experimentation with screen.width and screen.height (see
<URL:http://www.javascripter.net/faq/screensi.htm> for example), you
could set the new window's dimensions to a percentage of the screen
size, which is probably more useful today than just picking pixel
dimensions.
Thomas ("When the only tool you have is a hammer,
every problem looks like a thumb") Dowling
OhioLINK - Ohio Library and Information Network
tdowling@ohiolink.edu
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic