[WEB4LIB] Little popup windows...HTML question

Thomas Dowling tdowling at ohiolink.edu
Tue May 9 11:41:16 EDT 2000


----- Original Message -----
From: "Robin Zalben" <zalbenrl at alverno.edu>
To: "Multiple recipients of list" <web4lib at webjunction.org>
Sent: Tuesday, May 09, 2000 10:57 AM
Subject: [WEB4LIB] Little popup windows...HTML question


> For our database list, I'd like to make small html files which give
> descriptions of the databases.  Something where you would click on the
"i"
> and up would pop a small window with the basics of the database.
>
> This may be (hopefully) a simple question, but how can I make a new
window
> open up, and how can I size it so it is only the size of the
information?

Simple question, somewhat involved answer.

Speaking as someone who has implemented pop-up windows a number of times,
I have to say that pop-up windows are almost always bad.  They constitute
a serious accessibility problem, they're liable to confuse novice users
with multiple overlapping windows, and the pixel-based dimensioning you
can throw at them has very little connection to the font-based
dimensioning you really want.  We only use them as an accompaniment to
session-based interfaces where navigating the main window out of the
logical path of the search session has greater risks than opening a new
window.

That said, most solutions combine a JavaScript window.open command and a
target attribute in an HTML link.  Here's one way to do it.  I'm sure a
JavaScript ace can do it more gracefully:

<a href="foo.html"
  onClick='TipWin =
window.open("","DBNote","menubar=yes,scrollbars=yes,toolbar=yes,resizable=
yes,width=400,height=250"); TipWin.focus()'
  target="DBNote">Database Description</a>

[Note that the onClick attribute value--everything between the single
quotes--should be on one line.]

IMO, you are honor bound to A) consider other design alternatives first,
B) ensure that the links are usable without JavaScript enabled, C) give me
my standard controls and menus in any new window you open, and D) re-use
the same external window rather than spawning an uncontrolled number of
new windows.

Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu




More information about the Web4lib mailing list