[thelist] Javascript setTimeout losing object properties

Jeff Howden jeff at jeffhowden.com
Sat Jun 25 12:53:53 CDT 2005


Iain,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Iain
> 
> [...]
> 		setTimeout("fadeIn('" + obj + "')", 100);
> [...]
> 
> When I mouseover the list items, the fadeIn() function
> only executes once and then I get errors telling me
> that obj.style has no properties.  The same happens on
> mouseout.  Could someone put me out of my misery and
> tell me what's wrong?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

You're passing obj to fadIn() and fadeOut() as a string in your
setTimeout().  Remove the extra single-quotes and your probably should be
solved:

setTimeout("fadeIn(" + obj + ")", 100);

Good luck,

 [>] Jeff Howden
     jeff at jeffhowden.com
     http://jeffhowden.com/



More information about the thelist mailing list