|
phillipu -> javascript visibility toggle, always starts "visible" instead of "hidden" (5/10/2004 15:21:06)
|
Hi all, I am using some javascript to toggle the visibility of a table, the toggle is working fine, my prob is that whenever the page with the toggle loads, it loads my table as "visible", i need the page to load with the table to toggle as "hidden", then the user can click the text link and the table becomes "visible". Here is the javascript code - <script language="JavaScript">
function toggle(target, iNo)
{
obj=document.getElementById(target+String(iNo));
obj.style.display=( (obj.style.display=='none') ? '' : 'none');
}
</script> this code is the onclick for the toggle - <td bgcolor="#F4F4F4" width="540" class="data" onClick="toggle('status',1)" id="rfcpe_status" style="cursor:hand"> this code is the table that is toggled - <table width="700" border="0" cellspacing="2" cellpadding="2" bgcolor="#FFFFFF" id="status1"> Thanks, Phillip
|
|
|
|