| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Jun 2005 Location: Hat Yai, Thailand
Posts: 165
![]() | again, more IE headaches... Damn, I hate this shitty software more everyday, pardon my French. My issue is the next JavaScript function: function menuHomeSwitch() { ????: NamePros.com http://www.namepros.com/programming/200191-again-more-ie-headaches.html //set all items to #B5C4DD for background color var temp = document.getElementsByName('nav') for (var x = 0; x<temp.length; x++) { temp[x].style.background = '#B5C4DD' } } I have an serie of <td> tags with the name 'nav', and like the function shows, all I need to do is set the background colors to a different color. According to the DOM level 1 specification, this should work and it does so in all browsers, ACCEPT IE ofcourse. Any suggestions before I kill myself? tnx much! -monty |
| |
| | THREAD STARTER #5 (permalink) | ||||
| NamePros Member Join Date: Jun 2005 Location: Hat Yai, Thailand
Posts: 165
![]() | Thanks for helping out everybody!
????: NamePros.com http://www.namepros.com/showthread.php?t=200191 function menuHomeSwitch() { //set all items to #B5C4DD for background color document.getElementsByName('nav').style.background = '#B5C4DD' } And set the <td> tags class attribute to "nav", but still no joy, this doesn't in other browsers as well. Now, I didn't get much sleep last, so am I missing something here? -monty | ||||
| |