[thelist] Image rollover check

Austin Harris austin at dotmail.co.uk
Wed Mar 7 03:18:26 CST 2007


Just to add to the confusion, you could use css for the rollover instead.

A lot less script and less problems regarding unobtrusiveness. (With css turned off you would just see "both" images.)

Progressive enhancement is the other phrase to watch out for regarding scripting like this...


----- "Julian Rickards" <julian.rickards at gmail.com> wrote:
> There are a number of words/phrases to describe what I am refering
> to:
> unobtrusive and DOM scripting are just two. What is meant by these
> phrases
> is that the JavaScript does not exist in the page but rather, like
> CSS, the
> script is designed to search for the appropriate element (via tags,
> IDs,
> classes or other attributes) and then act upon it. I used to call it
> remote
> scripting because the JavaScript was separate or distant from the
> component
> on which it worked. For example, for your rollover script, you might
> have
> <img id="comicstrip"... /> and then in the JavaScript code, have it
> search
> for the ID of comicstrip using getElementById and then run the
> rollover.
> 
> I am not very good at JavaScript so I can't really talk much more
> about this
> but if you have PHP programming skills, you should be able to pick up
> the
> concept fairly quickly. I would recommend Jeremy Keith's DOM Scripting
> book
> as a first start along with Christian Heilmann's online tutorials at
> http://onlinetools.org/. After that, I would recommend Christian's
> book<http://www.amazon.com/exec/obidos/ASIN/1590596803/onlinetoolsorg/103-1380453-3336648>and
> ppk's
> book
> <http://www.amazon.ca/ppk-JavaScript-Peter-Paul-Koch/dp/0321423305>.
> 
> Given my statement above, your assumption that my review of your JS
> code
> puts a stamp of approval on it is wrong: I can't really comment on the
> code
> other than it works in FF. There are lots of good DOM script-type
> rollovers
> available that would ensure that all browsers capable of running a
> rollover
> will do so correctly.
> 
> Best of luck,
> 
> Jules
> 




More information about the thelist mailing list