wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes display items using java script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "display items using java script" Watch "display items using java script" New topic
Author

display items using java script

som bhardwaj
Greenhorn

Joined: Jan 17, 2009
Posts: 2
Hi all,

how can i display items using java script in <li>, please provide the code.

my code is :
<div class="dhtmlgoodies_question">Q: What are the advantages of table less design?</div>
<div class="dhtmlgoodies_answer">
<div>
Ohh! There are so many:
<ul>
<li>Faster loading pages</li>
<li>Smoother loading pages</li>
<li>Saved bandwidth</li>
<li>Separate layout and content</li>
<li>Easy to change layout</li>
<li>Increased accessibility</li>
<li>Different styling for different media(print, screen, pda)</li>
</ul>
</div>

and i want to use some function which display the items.


Thanks in advance
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

Som,
You could create an empty select list in the HTML and then use JavaScript to do the adds. See this example for how to add an Option to a Select in JavaScript.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
I am not sure what you are asking by "display" the items.

Eric
 
Don't get me started about those stupid light bulbs.
 
subject: display items using java script
 
Similar Threads
Not working with MSIE7
For Servlet request, FireFox is opening file for JSON Data
How to overlap two or more <div>s?
Passing arguments to function passed to event click function.
set values in a table from other