HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 25th, 2000, 04:18 PM
CS CS is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Posts: 44 CS User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I have a list of links.
Each link corresponds with a hidden Div layer.
Clicking the link shows the corresponding div layer and hides the rest.

It works fine in IE, but Netscape can't handle it. I assume it is because I call the same function multiple times in one click.

My question: How could I make it so that clicking the link would call on one function that would show the corresponding div and hide the rest? Is there an easier way to do this than to rewrite the function for each layer?

Open to suggestions. Thanks.

Reply With Quote
  #2  
Old October 26th, 2000, 06:27 PM
Anarchos Anarchos is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 28 Anarchos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
http://www.dansteinman.com/dynduo/en/showhide.html would be helpful, as would you actually posting your code. To hide all layers except one I would do something like:

function swapEm(layer){
layers = new Array("layer1","layer2","anotherlayer","yetanotherlayer");
for(var count = 0; count < layers.length; count++)
if (layer != layers[count]) hide(layers[count]);
show(layer);
}

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Show/Hide DIV in Netscape


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway