M
Mark
Hi - I had a post below about showing/hiding in IE and Netscape - could
someone please verify my revised code below and say if it will work in
both (I only have access to IE).
Thank you,
...in head...
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function show(faq){
if (obj=MM_findObj(faq)!=null) {
obj=MM_findObj(faq)
if (obj.style){ obj=obj.style;
v=obj.visibility;
if (v=='visible'){v='hidden';d='none';}
else {v='visible';d='block';}
obj.visibility=v;
obj.display=d;
}
}
}
//-->
</script>
...in body...
<div onClick="show('Layer1')">click here</div>
<table border=2><tr><td>
<div id="Layer1"
style="visibility:hidden;display:none">asdasdsdadasdasd<br>dsdasasddas<b
r>dasdasdasdasdasdas<br>asdasdasdasdsd<br>asdasdasdasdasda</div>
</td></tr></table>
someone please verify my revised code below and say if it will work in
both (I only have access to IE).
Thank you,
...in head...
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function show(faq){
if (obj=MM_findObj(faq)!=null) {
obj=MM_findObj(faq)
if (obj.style){ obj=obj.style;
v=obj.visibility;
if (v=='visible'){v='hidden';d='none';}
else {v='visible';d='block';}
obj.visibility=v;
obj.display=d;
}
}
}
//-->
</script>
...in body...
<div onClick="show('Layer1')">click here</div>
<table border=2><tr><td>
<div id="Layer1"
style="visibility:hidden;display:none">asdasdsdadasdasd<br>dsdasasddas<b
r>dasdasdasdasdasdas<br>asdasdasdasdsd<br>asdasdasdasdasda</div>
</td></tr></table>