[thelist] Need a hopefully simple javascript fix, and I'm a javascript idiot.

Matt Warden mwarden at gmail.com
Wed Mar 2 11:07:06 CST 2005


BJ,


something like this should work, assuming I understand your code
correctly (excuse the reformatting -- I also took out tabs where it
would probably cause confusing line wrap):


function montre(id)
{
	var d = document.getElementById(id);
	for (var i = 1; i<=10; i++)
	{
		if (document.getElementById('smenu'+i))
		{
document.getElementById('smenu'+i).style.display='none';
		} // end if
	} // end for

	if (d) 
	{
		d.style.display='block';
d.onmouseout = function() { d.style.display='none'; };
	} // end if
} // end function montre


window.onload=montre;


if that doesn't work, change the added line to this:
d.onmouseout = "this.style.display='none';";




-- 
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list