[WEB4LIB] onClick without creating a "button"

Thomas Dowling tdowling at ohiolink.edu
Fri Feb 4 16:27:33 EST 2000


> Hi all,
>
> I'm relatively new to using scripts on my webpages and was wondering if
> there is anyway of opening up a new window (such as using "onClick")
> without creating a gray button.  I am working with a site that has a <A
> HREF>tag with simple text in a table cell as the link.  We like the
looks
> of the table and do not want to add the all familiar gray button.
However,
> we would like to be able to open a new window instead of simply linking
to
> a new page.  I have tried adding the "onClick" to the <A HREF>. This
works,
> but results in opening a new page AND a new window.

[You're doing this with full knowledge of
http://www.useit.com/alertbox/990530.html right?]

Are you sure you need an onClick?  What's wrong with '<a href=...
target="_blank">'?  Or '...target="OurExtWindow">'?

If that really won't cut it, HTML4 allows onClick attributes for almost
every element, although some retrograde browsers don't honor them quite
everywhere.  But "<a href=... onClick=..." should do the trick.


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






More information about the Web4lib mailing list