[thelist] Wanted: the definitive fool-proof mouseover JavaScript

Paola Kathuria paola at limitless.co.uk
Thu Jun 28 22:49:58 CDT 2001


".jeff" wrote:
> From: Paola Kathuria
> > That's no reason for me to ignore some users when I know there's a
> > solution that fails gracefully for them.
> 
> maybe.  just don't go shooting the majority for the sake of so very few.

This implies that my alternative script won't work for the
majority.  How are the majority affected?

> > Nope, IE3 and NS2.02 ignore the JS1.1 script whilst NN3 runs it.
> 
> specifically which versions of ie3?

IE 3.0

> > > you're sending extra kb down the pipe for
> > > *every* browser so you can catch the problem
> > > for likely less than 0.1% of your browser
> > > users.

> > I don't know what extra KB you're referring to.
> 
> the 0.12kb for the first <script> block.

Feh.

I don't think that 120 bytes is anything to agonise over
and I don't think that you really do either (the JS used
on your mouseover script page includes about 400 bytes
- er, 0.4kb - of leading space).

In any case, the actual figure is 14 bytes smaller (when
comparing my two scripts to just one including tests for
document.images, with indentation), or 42 bytes bigger
(without indentation).

Therefore there doesn't seem to be any evidence for the
"it's too big!" argument against using the two-script
approach.

> by using the different language attribute values you *are* doing
> explicit js version testing.

I meant a la Flanagan (author the O'Reilly JavaScript book):

<SCRIPT LANGUAGE="JavaScript1.1"> _version = 1.1 </SCRIPT>

<SCRIPT LANGUAGE="JavaScript">
  if (_version = 1.1) {

  [...]
</SCRIPT>

> i've still gotta wonder though -- for as long as we've had the hassle of
> developing for ie3, don't you think this sort of solution would have been
> discovered already?  that to me is an indication that's there's probably
> something crucial missing (lots of minor version number browsers) from your
> testing.

Aha, is this the main reason you're not happy with it?

And, no, I don't think that everything's been invented yet
when it comes to, umm, browser-friendly web techniques.

> > I've now tested the script on:
> > - IE 3.0, 4.0, 5.5 (Win)
> > - NS 2.02, 3.04, 4.7, 4.72 (Win); 4.77 (Linux); 4.0.5 (Mac)
> > - Mozilla 0.9+ (Linux)
> > - Opera 5.11 (Win)
> 
> add nn2.02/mac, nn3.04/mac, ie5/mac, opera4/win, and webtv2/win to the mix
> of browsers that support it.  frankly i'm not really surprised by the
> post-js1.0 browsers supporting it.  it's the js1.0 browsers, specifically
> all the various, bug-ridden versions of ie3, that haven't been tested yet.

Thanks for the suggested test list.  Very useful.

I don't have access to a Mac to test NN 2.02, NN 3.04, IE 5.
My understanding with IE is that I can only have one version
installed at the time and so I can't test with IE 3.02 that's
on browsers.evolt - what other IE 3 versions are there and
where would I get them from?

I just tested it on WebTV 2/Win (yikes!) and it works okay.
Where can I get Opera 4 from?

It'd be great if anyone reading this far has these browsers
that they could test my script with:
http://www.limitless.co.uk/~paola/tmp/thelist/

Jeff, if the scripts performed without errors on all the
browsers you suggest, would you accept it was a viable
alternative to testing for document.images?


Paola, her head still reeling from the WebTV simulator.




More information about the thelist mailing list