kamarthi7
04-30-2003, 10:28 AM
Is it possible to display and hide the div elements on click in netscape.
for example
<html>
<head>
<script language="javascript">
function toggle(id)
{
if(document.getElementById(id).style.display=="none")
document.getElementById(id).style.display="block";
else
document.getElementById(id).style.display="none";
}
</script>
</head>
<body>
<a href="javascript:void(null);" onclick="toggle('toggleMe');">click here</a>
<div ID="toggleMe" style="display:none">some text here</div>
<br><a href="javascript:void(null);">nothing</a>
</body>
</html>
this code perfectly works in IE. but is posible to do it in netscape 4.x. if yes how please.
thank you....
ANIL
for example
<html>
<head>
<script language="javascript">
function toggle(id)
{
if(document.getElementById(id).style.display=="none")
document.getElementById(id).style.display="block";
else
document.getElementById(id).style.display="none";
}
</script>
</head>
<body>
<a href="javascript:void(null);" onclick="toggle('toggleMe');">click here</a>
<div ID="toggleMe" style="display:none">some text here</div>
<br><a href="javascript:void(null);">nothing</a>
</body>
</html>
this code perfectly works in IE. but is posible to do it in netscape 4.x. if yes how please.
thank you....
ANIL