File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Create a grid and capture values under them Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Create a grid and capture values under them " Watch "Create a grid and capture values under them " New topic
Author

Create a grid and capture values under them

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

This is a requirement , i need to work on , there is a grid like structure ( similar to a table with many rows and cells in form of TextFields)

When the user fills up these cells and enter on submit button , i need to validate those values under onClick button .

Please give me an idea as how to proceed with this task ??

Thanks in advnace .


Save India From Corruption - Anna Hazare.
Harpreet Singh janda
Ranch Hand

Joined: Jan 14, 2010
Posts: 317

What type of validation do you want

You can provide the id to each text box like text1,text2,..............textn ad on onClick event you can call a java script method where you can iterate on a loop from 1 to n (take a vaiable i for iteration) and get the element by using getElemntById('text'+i) method and perform the validation after getting the value of the elmement like:


Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Harpreet , Thanks for the idea .

i know how to ceate grid in javascript using for loop , but didn't knew the extraction logic of them . Now its clear .
Thanks man once again .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create a grid and capture values under them