Results 1 to 2 of 2

Thread: hiding <tr> in Netscape?

  1. #1

    Thread Starter
    Hyperactive Member billwagnon's Avatar
    Join Date
    Jul 1999
    Location
    St. Louis, Missouri, Mississippi Valley
    Posts
    290

    hiding <tr> in Netscape?

    I want to hide certain rows of a table depending on what selection the user makes.

    Here is my code that works in IE 6, but it doesn't do anything in Netscape 6.


    If s == 'SP' then I want to hide some of the rows, if not then I want to show them. The rows each have a unique ID - 'OwnerPct1' etc.



    Code:
    Function swEntityType(s){
    
    	var OwnerPct1 = document.getElementById("OwnerPct1");
    	var OwnerPct2 = document.getElementById("OwnerPct2");
    	var Owner2 = document.getElementById("Owner2");
    
    	If (s == "SP") {
    		var sDisplay = "none";
    		Owner1Pct.style.display = sDisplay;
    		Owner2Pct.style.display = sDisplay;
    		Owner2.style.display = sDisplay;
    		}
    	Else {
    		var sDisplay = "";
    		Owner1Pct.style.display = sDisplay;
    		Owner2Pct.style.display = sDisplay;
    		Owner2.style.display = sDisplay;
    
    	}
    }

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    This is JavaScript right? Try lowercasing the F in Function, the I in If and the E in Else. JavaScript is case-sensitive isn't it? That may be causing a problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width