Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

layers

Status
Not open for further replies.

leo2180

IS-IT--Management
Jun 7, 2000
52
US
I need help with hiding/showing layers in Javascript, can someone point me in the right direction.&nbsp;&nbsp;For example, I have a drop doen menu of numbers and I want whnever I select a number and click the buton beside it, it shows the amount of layers for the amount I selected.&nbsp;&nbsp;<br><br>The following code only show and hide a particular layer.&nbsp;&nbsp;How can I edit this to do the above...?<br><br>&lt;SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot;&gt;<br>n = (document.layers) ? 1:0<br>ie = (document.all) ? 1:0<br>function show() {<br>&nbsp;&nbsp;&nbsp;&nbsp;if (n) document.layer1.visibility = &quot;show&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;if (ie) layer1.style.visibility = &quot;visible&quot;<br>}<br>function hide() {<br>&nbsp;&nbsp;&nbsp;&nbsp;if (n) document.layer1.visibility = &quot;hide&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;if (ie) layer1.style.visibility = &quot;hidden&quot;<br>}<br>&lt;/SCRIPT&gt;<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top