File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Javascript  code help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript  code help" Watch "Javascript  code help" New topic

Javascript code help

Monoj Roy
Ranch Hand

Joined: Oct 10, 2007
Posts: 98
I have a div in my jsp and in run time the div is populated with a table
I want to iterate through the div and want to find if there is any td Tag and want to get the text value of it .

i want the following code help :

var mydiv = document.getElementById("divid");
then iterateElement(mydiv)
and alert all text value of the Tag td in it and alert with all those coma separated .
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60046

Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

This post has been moved to a more appropriate forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60046

What have you written so far? Please be sure to use UBB CODE tags when posting code.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Monoj Roy

Look into getElementsByTagName

I agree. Here's the link:
subject: Javascript code help
Similar Threads
div tag problem
Javascript failing to evaluate?
javascript event ?
How to use Inbuilt Pagination Suppourt of DOJO Framework while displaying Data in JSP
How to pass a javascript variable on a jsp to a servlet