aspose file tools*
The moose likes Servlets and the fly likes Passing array of checkboxes from one JSP to another Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Passing array of checkboxes from one JSP to another" Watch "Passing array of checkboxes from one JSP to another" New topic
Author

Passing array of checkboxes from one JSP to another

geeta khurana
Greenhorn

Joined: May 18, 2001
Posts: 6
Hi,
I want to pass the status of chekboxes from one JSP to another using javascript. Through querystring, i am able to pass other parameters but how do I pass the controls of the form. Can i send the controls of the form from one JSP to another like ASP. Pls help.
Thanks.
vik nuckchady
Greenhorn

Joined: Apr 25, 2001
Posts: 25
Hi Geeta,
I have not understood the question very well. But here are 2 solutions (damn different)
Sol1. Code below is in a jsp page (say first.jsp). This is a client to server communication through a form.

with the above code first.jsp will pass the state of the checkboxes to the second jsp.

Sol2. This one uses javascript. Here is the situation. The 2 jsp files are now (html). So this is a client to client solution.
Let say we have 2 jsp files on a server (first.jsp and second.jsp). So on the client we now have first.html and second.html. Obviously first.html and second.html have to be in either 2 frames or 2 windows.
The solution with frames (Let say first.html is in an frame called A and second.html is in a frame called B).
Now to send data from A to B. You will say from first.html in some javascript function:

The solution with windows. Let say first.html is in Window A and second.html is in Window B. Moreover let say Window B was opened from Window A, that is:
// in first.html there was something like that


Hope this helps
 
 
subject: Passing array of checkboxes from one JSP to another