aspose file tools*
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
Author

Javascript accessing Arraylist of the form

Sachin Ag
Greenhorn

Joined: Sep 15, 2010
Posts: 5
Hello

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.


Regards
Sachin
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8710
    
    6

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript accessing Arraylist of the form
 
Similar Threads
Javascript in Struts
problem with hashmap and <s:iterator> tag in struts2
how to put images on displaytags column header????
JTable printing - choosing columns and rows
make javascript form accesible