[thelist] javascript pop-up problem

.jeff jeff at members.evolt.org
Mon Jul 23 19:05:23 CDT 2001


james,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: James Aylard
:
: <a href="img.jpg" target="newWindow"
:   onclick="fnOpen('img.jpg'); return false;"
: >Image</a>
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

or even better -- if you're going to be providing a real link in the href
attribute, then simply reference that property of the anchor using the
"this" keyword from within your function:

<a href="img.jpg" target="newWindow"
  onclick="fnOpen(this.href); return false;"
>Image</a>

saves typing and the chance of making a mistake.  it also makes it all
easier to change links since you only have to change the href attribute.

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thelist mailing list