I am pretty new to Javascript and trying to display a result set from a database when the user clicks on a word. My javascript function is:
<SCRIPT>
function toggle(e)
{
if (e.style.display == "none"
{
e.style.display = "";
}
else
{
e.style.display = "none";
}
}
</SCRIPT>
and the relevant parts of my html code are:
<div style = "cursor: hand" onClick = "toggle(document.all.HideShow);">
View
</div>
<span style = "colour: blue" id = HideShow>
**the data that I want to display**
</span>
I am using IE 5.5, however this code would need to run on various different versions.
Any help??
<SCRIPT>
function toggle(e)
{
if (e.style.display == "none"
{
e.style.display = "";
}
else
{
e.style.display = "none";
}
}
</SCRIPT>
and the relevant parts of my html code are:
<div style = "cursor: hand" onClick = "toggle(document.all.HideShow);">
View
</div>
<span style = "colour: blue" id = HideShow>
**the data that I want to display**
</span>
I am using IE 5.5, however this code would need to run on various different versions.
Any help??