PDA

View Full Version : visibility/onload problem with Firefox


dimamo1983
09-01-2004, 06:34 PM
I'm trying to make something visible by calling an onload function. It works fine in IE and Opera, but Firefox, Netscape and Mozilla don't change the visibility of the element:

http://car.eng.ohio-state.edu/webpages/challengex/example.html

any idea on why minuteslist.style.visibility="visible" is not working and how can i fix this?

thanks
dima


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title>The Ohio State University Challenge X team - Schedule</title>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta>

<script language="javascript">
function blah()
{
alert("inside");
minuteslist.style.visibility="visible";
return false;
}
</script>


</head>

<body onload="blah();">

<ul id="minuteslist" style="visibility:hidden">
<li><a href="minutes/082504.pdf" target="_blank">August 25th, 2004</a></li>
<li>August 18th, 2004</li>
<li>August 12th, 2004</li>

<li>August 5th, 2004</li>
</ul>

</body>

</html>

dimamo1983
09-01-2004, 10:07 PM
just got it to work, so FYI for whoever will have the same problem:

use

document.getElementById("minuteslist").style.visibility="visible";

instead of just

minuteslist.style.visibility="visible"

works in IE, Opera, Mozilla, Netscape, and Firefox :D