Advertisement

09.03.2003 at 03:25AM PDT, ID: 20727465
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

How to hide several <div>'s in Netscape

Asked by earthman100 in JavaScript

Tags: ,

I am having trouble getting this script to work in Netscape although it works fine in Internet Explorer.  (Seems to be common....hmmmm)  I also want the link to hide all the other div's with id's that start with "obj" - I haven't been able to get it to recognize the "obj" in the id to filter them out  I tried using a substr but the first div it ran into is one that doesn't exist in my html and had no name or id (????) so I got errors each time.  The only way I could get around it was with a counter that skips the first two divs, but I would rather do it the right way.

Anyways, here is the html code that calls it:

<a href="#" onclick="javascript:hideAll();show('objcontent');">Content Management Systems</a><br><br>

here is an example of the objects to show/hide:

<div id="objcontent" style="visibility:hidden; Z-INDEX: 1; POSITION: absolute; LEFT: 470px; TOP: 112px; width: 304px; height: 277px;">content here</div>

and here is the javascript:

function hideAll()
{
      var array1 = new Array();
      var array2 = new Array();
      var counter;
counter = 0
array1 = document.getElementsByTagName("div");
for(var item in array1)
      {
            counter = counter + 1;
            if (counter > 2)                 //counter to skip the first two (workaround)
                            {
                  if(array1[item].id.substr(0,3) == "obj")       //this line gives an error if the counter isn't there
                  {
                        array2[counter] = array1[item];
                  }
            }
      }
for(var item in array2)
      {
document.getElementById(array2[item].id).style.visibility="hidden";
      }
};

function show(pick){
document.getElementById(pick).style.visibility="visible";
};


Please help me, if you can, to:

1.  Filter out div id's by their prefix properly
2.  Make the script show and hide the div's in Netscape

Thank YouStart Free Trial
 
Loading Advertisement...
 
[+][-]09.03.2003 at 03:27AM PDT, ID: 9274008

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.03.2003 at 03:28AM PDT, ID: 9274017

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.03.2003 at 03:38AM PDT, ID: 9274151

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.03.2003 at 04:10AM PDT, ID: 9274450

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.03.2003 at 04:11AM PDT, ID: 9274464

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.03.2003 at 04:32AM PDT, ID: 9274711

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.04.2003 at 02:52AM PDT, ID: 9286484

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.04.2003 at 10:08AM PDT, ID: 9289836

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.04.2003 at 04:55PM PDT, ID: 9292417

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: javascript, hide
Sign Up Now!
Solution Provided By: earthman100
Participating Experts: 3
Solution Grade: A
 
 
[+][-]09.04.2003 at 10:07PM PDT, ID: 9293531

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32