SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    N. CA
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simple script won't work in Netscape 7

    I wrote this simple function that higlights a table row when a user mouses over it. It only works in IE. Anyone know off the top of their head what needs to be done to make it compatible with NS?

    First i put the following on a tr tag so it highlights all the tds in that row
    HTML Code:
    <tr onmouseover="highlightme(this,'on')" onmouseout="highlightme(this,'off')">
    and heres the function
    Code:
    function highlightme(inst,action){
    	for(var i=0; inst.childNodes[i] != undefined; i++){
    		if(action == "on"){
    			inst.childNodes[i].style.backgroundColor = "#e9e9e9";
    		}else{
    			inst.childNodes[i].style.backgroundColor = "#ffffff";
    		}
    	}
    }
    any suggestions? Thanks.

  2. #2
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    N. CA
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind I figured it out. you can delete this post (sorry)


Bookmarks

Posting Permissions

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