| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | again, more IE headaches... Damn, I hate this shitty software more everyday, pardon my French. My issue is the next JavaScript function: function menuHomeSwitch() { //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 |
| |
| | #2 (permalink) |
| NamePros Regular | why don't you use CSS instead ?
__________________ Joćo Fernandes Silva Selling : 19P.ORG - ARCADEHITS.ORG - AZIAN.NET - COREFANS.COM - CTUTORIALS.NET - DEDISEEK.COM - HITCHECK.COM - HOST15.COM - HOSTCUSTOMER.COM - LARGETIPS.COM - SCRIPTCANDY.COM - VISUALBOOK.NET - VOXVPS.COM / .NET - WALLPAPERSARENA.COM |
| |
| | #5 (permalink) | |
| NamePros Member | Thanks for helping out everybody! Quote:
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 | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |