R
Raj_genius
This is a peculiar problem..plzz i need its solution as soon as
possible..here is my case:
I hav a jsp page where in i have 3 combo boxes, and corresponding 3
buttons..upon clicking each button, a javascript function is called
which checks if the corresponding selected option in the combo box is
valid or not..
If valid, it forwards the end user to another page for next phase of
actions..
now..what my problem is, after checking/validation thru the javascript
function, the function has to forward/move to either of 3 different
pages..i.e
if user clicks on button 1 and data of combo box 1 is valid then go to
page1.jsp
if user clicks on button 2 and data of combo box 2 is valid then go to
page2.jsp
if user clicks on button 3 and data of combo box 3 is valid then go to
page3.jsp
so..depending on whc button is clicked, the page can be forwarded to
any of the 3 pages..
i hav accomplished this by using location.herf within the javascript
function and i can go to the desired page
but the problem is that, the called jsp page(page1.jsp or page2.jsp or
page3.jsp) cannot access the calling page's controls using
request.getParameter(<parameter name>)
the called jsp page can access the caller page's controls only if i use
the submit() method in the calling page, which is not possible in my
case as i donot hav a single/unique page to submit..i hav 3 different
pages whc can be called..
if i use location.herf, then the required page is loaded, but the
called jsp page cannot access parameters using request.getparameter()
if i use jsp:forward tag, the page is forwarded immediately when its
loaded, without any action...
plzz tell me a solution to this problem so that i can forward to a new
page as well as access the caller's controls from the called jsp page...
possible..here is my case:
I hav a jsp page where in i have 3 combo boxes, and corresponding 3
buttons..upon clicking each button, a javascript function is called
which checks if the corresponding selected option in the combo box is
valid or not..
If valid, it forwards the end user to another page for next phase of
actions..
now..what my problem is, after checking/validation thru the javascript
function, the function has to forward/move to either of 3 different
pages..i.e
if user clicks on button 1 and data of combo box 1 is valid then go to
page1.jsp
if user clicks on button 2 and data of combo box 2 is valid then go to
page2.jsp
if user clicks on button 3 and data of combo box 3 is valid then go to
page3.jsp
so..depending on whc button is clicked, the page can be forwarded to
any of the 3 pages..
i hav accomplished this by using location.herf within the javascript
function and i can go to the desired page
but the problem is that, the called jsp page(page1.jsp or page2.jsp or
page3.jsp) cannot access the calling page's controls using
request.getParameter(<parameter name>)
the called jsp page can access the caller page's controls only if i use
the submit() method in the calling page, which is not possible in my
case as i donot hav a single/unique page to submit..i hav 3 different
pages whc can be called..
if i use location.herf, then the required page is loaded, but the
called jsp page cannot access parameters using request.getparameter()
if i use jsp:forward tag, the page is forwarded immediately when its
loaded, without any action...
plzz tell me a solution to this problem so that i can forward to a new
page as well as access the caller's controls from the called jsp page...