View Single Post
Old 10-12-2012, 12:38 AM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,993 Times in 3,962 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Makes no sense.

You call the function thus:
buttons = CALC_GLBS.preLoad(document, list);

and then in the preLoad function you use a.length which of course means you are then using document.length

So far as I know, document.length is meaningless in any browser.

The real reason it works is because you are using unneeded code.

Just doing
Code:
     var img = [ ];
would be sufficient.

Not to ask a silly question, but WHY are you doing if ( document.images )??? There are no modern browsers that don't support images. That makes less sense than people who do if ( document.getElementById )

Anyway, the thing you haven't shown us in either post is where in the heck you are getting the list or array that you pass to argument b in the preLoad function.

And, finally, I don't understand why you want to invoke the over function on EVERY image button just because ONE of them was rolled over. Is there really a purpose in this?
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote