• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic