wood burning stoves 2.0
The moose likes Struts and the fly likes Javascript accessing Arraylist of the form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Javascript accessing Arraylist of the form" Watch "Javascript accessing Arraylist of the form" New topic

Javascript accessing Arraylist of the form

Sachin Ag

Joined: Sep 15, 2010
Posts: 5

I have an arraylist of objects and am using logic:iterate on the jsp page to display the table contents dynamically. My object has 3 fields, one checked variable for checkbox, one description and one value. What i want is that when submit button is clicked, then in javascript i need to do some validations. In javascript i want to get all the checkbox selected in the table and the corresponding description and value of that row.

I didn't find any way to access java arraylist in Javascript. Somewhere i read convert arraylist to javascript array but didn't find any concrete example.

Please do provide me some example of this scenario.
Some code snippets needed.
Thanks a lot.

Joe Ess

Joined: Oct 29, 2001
Posts: 9136

This post is awful similar to your other post on the subject. You can't access the server-side array list from the client-side javascript. You'll have to print the array list values out and manipulate them with JavaScript, which seems pretty much what you are doing in your other post.

[How To Ask Questions On JavaRanch]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Javascript accessing Arraylist of the form
It's not a secret anymore!