• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

passing JS values between 2 pages

 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have 2 jsp's ...in jsp1 I have a row with two cells empty whose values are created in jsp2 .I should select a row and onclick of button 'go' should proceed to jsp2.In jsp2 I prepare the two values and on click of Add button in jsp2,the values should be passed onto jsp 1 and set in appropriate cells.I wrote a javascript in jsp2 for preparing values and have those 2 values in 2 JS variables.How should i fetch these values and put in the appropriate cell of jsp1? plzzz help me put! thnku...
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use real words when posting to the forums. Abbreviations such as "plzzz" in place of "please" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
Bear Bibeault
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Append the values as query parameters on the URL.

And as this is not a JSP question, it's been moved to the HTML/JavaScript forum.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And how are jsp1 and jsp2 related?

Eric
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric, Here it goes... In JSP 1 I have a table with 6 columns... Initially in the JSP1 the table contains only a header.The rows for the table are added dynamically and only for column values are added in this JSP via a form.The remaining two values should be obtained from JSP-2 which is precisely created to send those 2 values

For example I added 4 rows i.e The table now contains 4 rows with the first four row-column values filled up and the remaining two columns of all rows left empty.
Now the user is supposed to select a row and click on 'Fetch' button in JSP-1 to go to JSP-2 to for fetching values .In JSP-2, I prepared the values and have them in two JS variables,var-1 containing value for one of the two empty columns and var-2 for the other empty one of selected row of JSP-1.Now in JSP-2 when user click on 'Send' button the control goes back to JSP-1 and these two values should fly and sit in their appropriate places of the two empty columns of the selected row of JSP-1.

What are the ways in achieving this?? I am learning how to append values as query parameters on the URL...

what is the best way?? I am developing in struts-2 ... Badly stuck here!
 
it's a teeny, tiny, wafer thin ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic