Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

a JS value passing issue  RSS feed

Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 jsp's

In the first jsp I have a table with a few rows having 5 columns and 1st column being the primary key...

In all the rows the last 2 column values calculated and are obtained from the next JSP.So in JSP 1 the user selects a row and for that row the values are obtained from JSP2.

In JSP2 table there is a table with the 1st column being a foreign key to the JSP 1 table and the 2 column for the two values calculated in JSP2 that are to be sent to JSP1...

So if a user selects Row1 and clicks on 'GOTOJSP2' button , to JSP 2 to prepare the values for the empty 2 columns for row 1.Now in JSP2 ,I have the 2 values to be sent in a javascript variable.

On click on 'AddValues' button in JSP2,the control goes back to jsp1 and should set these values in the two empty spaces of the selected row of JSP1.

What should I do in JSP2 on click on 'AddValues' button? Any inputs or change in approach are welcomed! The application is in struts-2 but I felp the issue is circled around JS and hence the post here!
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!