aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes setAttribute() Not Working in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "setAttribute() Not Working in IE" Watch "setAttribute() Not Working in IE" New topic
Author

setAttribute() Not Working in IE

Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15229

I have created a table with rows that highlight as the mouse moves over them. I am doing something similar to this.





Works great in FF but not in IE(6). I've also tried x.on Mouse Over = ... but that does not seem to work in either browser. Anyone have a cross browser solution?

(spaces on mouse events due to UBB rendering)
Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
IE is not reliable with setAttribute. Sometimes it works sometimes it does not what you need to do is rather simple.

x.onmouseover = function(){this.className='highlight';}

Eric
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15229

Thanks Eric. So where is this documented? Seriously.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
Quirksmode.org should become your friend...

http://www.quirksmode.org/bugreports/archives/2005/03/setAttribute_does_not_work_in_IE_when_used_with_th.html

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setAttribute() Not Working in IE
 
Similar Threads
onClick and openPage
get value on click from table using javascript
How to call a JSP file within a JavaScript file
hyperlink to table row
retain row highlighting after selecting a row in datatable