| Author |
passing value from one JSP to another JSP through JavaScript
|
San Smith
Greenhorn
Joined: Feb 10, 2008
Posts: 14
|
|
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
Joined: Jan 24, 2008
Posts: 12
|
|
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
|
 |
 |
|
|
subject: passing value from one JSP to another JSP through JavaScript
|
|
|