| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Jan 2005 Location: United Kingdom
Posts: 75
![]() | Hide show div problem $15 to solve it $15 to solve it! Hi all, I am using this script to hide and show divs on my webpage, I want a dive to show on the left when a flash thumbnail is clicked and the previous div to be hidden. ????: NamePros.com http://www.namepros.com/programming/236642-hide-show-div-problem.html this is what I have so far: http://www.design-direction.net/portfolio/index.html I have this in my head section: <script type="text/javascript"> function clearcontent() { if (document.getElementById) { var style2 = document.getElementById("w1").style; style2.display = "block"; var style3 = document.getElementById("w2").style; style3.display = "none"; var style3 = document.getElementById("w3").style; style3.display = "none"; var style3 = document.getElementById("w4").style; style3.display = "none"; var style3 = document.getElementById("w5").style; style3.display = "none"; var style3 = document.getElementById("w6").style; style3.display = "none"; var style3 = document.getElementById("w7").style; style3.display = "none"; var style3 = document.getElementById("w8").style; style3.display = "none"; var style3 = document.getElementById("w9").style; style3.display = "none"; var style3 = document.getElementById("w10").style; style3.display = "none"; var style3 = document.getElementById("w11").style; style3.display = "none"; var style3 = document.getElementById("w12").style; style3.display = "none"; var style3 = document.getElementById("w13").style; style3.display = "none"; var style3 = document.getElementById("w14").style; style3.display = "none"; } } window.onload=clearcontent; function toggleLayer(whichLayer,turnoff1,turnoff2) { if (document.getElementById) { // this is the way the standards work var turnon = document.getElementById(whichLayer).style; var turnoff1 = document.getElementById(turnoff1).style; var turnoff2 = document.getElementById(turnoff2).style; turnon.display = "block"; turnoff1.display = "none"; turnoff2.display = "none"; } } </script> and I have this on each flash button that control if a div is vissable: thumb1 - on (release) { getURL("javascript:toggleLayer('w1','w2','w3','w4' ,'w5','w6','w7','w8','w9','w10','w11 ','w12','w13','w14');"); } thumb2 - on (release) { getURL("javascript:toggleLayer('w2','w1','w3','w4' ,'w5','w6','w7','w8','w9','w10','w11 ','w12','w13','w14');"); } thumb3 - on (release) { getURL("javascript:toggleLayer('w3','w2','w1','w4' ,'w5','w6','w7','w8','w9','w10','w11 ','w12','w13','w14');"); } and so on
Last edited by jon21021985; 09-10-2006 at 03:31 PM.
Reason: added prize
|
| |