Well isn't NS6.1 odd.... It appears that BOTH my example and the new.backgroundColor example work and don't work...
As if you couldn't tell this is a background cell changer. ...and this code is firing on the ONCLICK of each cell :) Here is the weirdness... Say I have 3 cells wide table... Each named menu_item1, menu_item2 and menu_item3 respectively. This code reverts the previous cell to the original cell color and is part of the code to chage the newly clicked cell to a different color.. document.getElementById (CurrentHighlightedCell).style.backgroundColor='#006600'; Say I click through each cell consecutively. menu_item1, menu_item2 and then menu_item3 it changes each cell to the new color and the code above CORRECLTY changes the color back on the previous cell. That works perfect. Now the weirdness.. Say I click on menu_item3, it changes menu_item1 back to the original color fine... but then I click on menu_item2, it DOES NOT change the color back on menu_item3 using the above code. I double checked and the variables are correct.. Very odd... IS there another DOM way to reference this? Jeff On 8/11/05, Jeff W <[EMAIL PROTECTED]> wrote: > > I'll try the backgroundColor and give that a whirl... > Thanks, > > Jeff > > On 8/11/05, Charlie Griefer <[EMAIL PROTECTED]> wrote: > > > > if it's a literal ID value, then yes, he'd need quotes. I'm guessing > > it's a variable. > > > > Try backgroundColor (note the casing) instead of background. > > > > On 8/11/05, Jim Campbell < [EMAIL PROTECTED]> wrote: > > > Does it matter if you put the element ID in quotes? > > > > > > ....getElementById("CurrentHighlightedCell")... > > > > > > - Jim > > > > > > Jeff W wrote: > > > > > > >Can anyone tell me WHY this won't work in NS6.1 but work fine in > > ie5-6, > > > >firefox and NS8?? > > > > > > > >document.getElementById > > (CurrentHighlightedCell).style.background='#006600'; > > > > > > > >CurrentHighlightedCell is a variable that contains the current id of > > the > > > ><TD> background color I am changing. > > > > > > > >Thanks.. > > > >Jeff > > > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214594 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54