Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

passing value from one JSP to another JSP through JavaScript

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you help me?

I am trying to pass a value through this hyperlink. (Example: www.abc.com?value=1). I have following existing code. I just need to pass "value=1" end of the link from page1.JSP and I want to retrieve this value to page2.JSP (e.g. request.getParameter("value") . Can you please help me how I can pass "value=1" through the JavaScript function. I tried different way but did not work.

<html:link href="javascript:XXX('A');"> Link </html:link>


function XXX(A) {
document.MyForm.abc.value = A;
document.MyTypeForm.submit();
}

Thank you
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Smith,

Passing value from a JSP to another JSP using javascriopt can be done by methods in dhtml.
For Ex : consider there are 2 JSP's JSP1 and JSP2. in the JSP1 have a hidden variable and in the hidden variable onchange event call a function.

in the JSP2 ,

And in the JSP 1 when the value changes the onchange js function will be called and in the function take the hidden variable value and do the manipulation....

Hope i answered to YOUR question...

Regards,
KMR
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic