Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing array of checkboxes from one JSP to another

 
geeta khurana
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic