Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing value from one JSP to another JSP through JavaScript

 
San Smith
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • 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
 
rajan Kayarohanam
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic