[thelist] JavaScript - form.submit()

Jeff jeff at members.evolt.org
Wed Aug 2 11:57:58 CDT 2000


ted,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Theodore Serbinski <need-4-speed-ski at erols.com>
:
: But will this cache the images tho? If not, that is
: kinda useless, esp on slow connections as you to
: have leave the mouse over the link for the new image
: to appear. And btw, that is REALLY annoying, IMHO.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

when james gave this example he mentioned that this wasn't the best way of
doing it, only that it was for illustrative purposes.

<tip type="JavaScript" author=".jeff">

*always* use a function to do your image swapping.  this way you can make
sure that you're doing a check for support of the image object before trying
to access it, throwing an error for older browsers.  it's much harder to do
this check and call the swap within the onMouseover and onMouseout event
handlers and have your code still somewhat readable.  besides, you have to
have a script block to put your preloads in.  you *are* preloading, right?

</tip>


.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org





More information about the thelist mailing list