• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

working on html dom table rows

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello, i have been working on html doms using javascript. everything is well, until i encounter this: i have a table where in i need to change a row's background color everytime i specify a row number (this row number would identify which row should change background color). i get to do this but i have these problems:

  • it only happens for rows which i haven't set my background color yet (i have already formatted my html using css wherein each row is alternately colored in gray) [see picture]. Why is that? what should i do to remedy this?
  • when a different row number is chosen after another, the background color previously set for the previous row remains, what i want is for the new background color to completely transfer to new row specified and the previous row be returned to the original color it was in. how do i do this? thanks.


  • I really hope you get to help me on this one because I'm really stumped! thanks!
     
    christine clarin
    Ranch Hand
    Posts: 106
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    i forgot to include the picture, here it is:
     
    Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
    Gift giving made easy with the permaculture playing cards
    https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    reply
      Bookmark Topic Watch Topic
    • New Topic