Jun 27, 2002 #1 arundahar Programmer Apr 27, 2001 53 GB I have 2 frames on my page. How do i change the "class" of an element using javascript? Thanks A.
I have 2 frames on my page. How do i change the "class" of an element using javascript? Thanks A.
Jun 27, 2002 #2 SashiRaveendran Programmer Nov 6, 2001 865 GB element.className = "NewClassName" Upvote 0 Downvote
Jun 27, 2002 Thread starter #3 arundahar Programmer Apr 27, 2001 53 GB hmm, what i actually meant is to change this : class='Show' to class='Hide' rather than the actual className itself.. Doesn't there have to be a document. before your example? Upvote 0 Downvote
hmm, what i actually meant is to change this : class='Show' to class='Hide' rather than the actual className itself.. Doesn't there have to be a document. before your example?
Jun 27, 2002 #4 SashiRaveendran Programmer Nov 6, 2001 865 GB <DIV id=ShowHideDiv>hello</DIV> <a href="#" onclick="ShowHide(); return false">Show/Hide</a> Either Write (IE, N6): <script language=javascript> function ShowHide() { if (ShowHide.style.visibility=="visible" { ShowHideDiv.style.visibility="hidden" } else { ShowHideDiv.style.visibility="hidden" } } </script> or (IE): <script language=javascript> function ShowHide() { if (document.all["ShowHideDiv"].style.visibility=="visible" { document.all["ShowHideDiv"].style.visibility="hidden" } else { document.all["ShowHideDiv"].style.visibility="hidden" } } </script> Upvote 0 Downvote
<DIV id=ShowHideDiv>hello</DIV> <a href="#" onclick="ShowHide(); return false">Show/Hide</a> Either Write (IE, N6): <script language=javascript> function ShowHide() { if (ShowHide.style.visibility=="visible" { ShowHideDiv.style.visibility="hidden" } else { ShowHideDiv.style.visibility="hidden" } } </script> or (IE): <script language=javascript> function ShowHide() { if (document.all["ShowHideDiv"].style.visibility=="visible" { document.all["ShowHideDiv"].style.visibility="hidden" } else { document.all["ShowHideDiv"].style.visibility="hidden" } } </script>
Jun 27, 2002 #5 SashiRaveendran Programmer Nov 6, 2001 865 GB <DIV id=ShowHideDiv>hello</DIV> <a href="#" onclick="ShowHide(); return false">Show/Hide</a> Either Write (IE, N6): <script language=javascript> function ShowHide() { if (ShowHide.style.visibility=="visible" { ShowHideDiv.style.visibility="hidden" } else { ShowHideDiv.style.visibility="visible" } } </script> or (IE): <script language=javascript> function ShowHide() { if (document.all["ShowHideDiv"].style.visibility=="visible" { document.all["ShowHideDiv"].style.visibility="hidden" } else { document.all["ShowHideDiv"].style.visibility="visible" } } </script> Upvote 0 Downvote
<DIV id=ShowHideDiv>hello</DIV> <a href="#" onclick="ShowHide(); return false">Show/Hide</a> Either Write (IE, N6): <script language=javascript> function ShowHide() { if (ShowHide.style.visibility=="visible" { ShowHideDiv.style.visibility="hidden" } else { ShowHideDiv.style.visibility="visible" } } </script> or (IE): <script language=javascript> function ShowHide() { if (document.all["ShowHideDiv"].style.visibility=="visible" { document.all["ShowHideDiv"].style.visibility="hidden" } else { document.all["ShowHideDiv"].style.visibility="visible" } } </script>