470,591 Members | 2,247 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

Will this work in Netscape and IE?

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[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].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">asdasdsdada sdasd<br>dsdasasddas<b
r>dasdasdasdasdasdas<br>asdasdasdasdsd<br>asdasdas dasdasda</div>
</td></tr></table>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
1 1170
In article <3f*********************@news.frii.net>, an*******@devdex.com
enlightened us with...
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).


If you had a complete page and a link, it would be a lot easier for
people to help you test.

Geocities, Angelfire, and other places have free sites - if your page is
intranet or local, you could put examples there with the minimum code it
takes to showcase your problem or what you want tested. Then we'd just
click the link and let you know if it works.

--
~kaeli~
Kill one man and you are a murderer. Kill millions and you
are a conqueror. Kill everyone and you are God.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jeff Wisnia | last post: by
40 posts views Thread by komone | last post: by
10 posts views Thread by Brett | last post: by
9 posts views Thread by chandramohan.mani | last post: by
reply views Thread by palomine1234 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.