Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Javascript List:  Alternating row colors?

Posted on 2006-11-29
2
Medium Priority
?
241 Views
Last Modified: 2012-05-05
I have a javasript app where I am filling a List <div> row-by-row using a string created by looping thru the following snipet:

      cacheImage_sm = "<img src='" + cacheImage_sm + "'>";
      geoList += cacheImage_sm
      geoList += "<a href=javascript:gotoGeocache("+i+")>"
      geoList += cacheName;
      geoList += "</a><br/>";
      document.getElementById("myList").innerHTML = geoList;

Is it possible to apply alternate row background colors in this list?

I tried bracketing the string with <bgcolor>, but did not see any affect in my list.  

Any suggestions??
0
Comment
Question by:markp99
2 Comments
 
LVL 6

Accepted Solution

by:
DonKyles earned 2000 total points
ID: 18042042
Try this
<div style="background-color:green; "> ......................</div>
0
 

Author Comment

by:markp99
ID: 18042152
Bingo!

Thanks a bunch!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question