| Author |
Multiple query parameters
|
Kalyan Anand
Ranch Hand
Joined: Feb 07, 2007
Posts: 194
|
|
I have a JSP page. On that page I display hyper links. When the user clicks on a hyper link it must pass on parameter besides whatever the URL currently carries. If my current status of url is http://localhost/MyApp/test?teststring=hello and I click on the hyperlink shown on this page it the url must be http://localhost/MyApp/test?teststring=hello&urlstring=testing. which appends the parameter to the existing parameters
If I give the url href parameter as urlstring=testing my url becomes http://localhost/MyApp/test?urlstring=testing and I am losing tghe other parameter. how can i achieve this ?
thank you
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
|
|
|
Why can't you just create the hyperlink with the proper URL in the first place? What make you wait until after the click to try and append a new parameter to the URL?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Kalyan Anand
Ranch Hand
Joined: Feb 07, 2007
Posts: 194
|
|
|
In my application I would not know what all things the end user chooses so it is not a static url for the hyper link. that is the reason why i need to keep on adding all the parameteres the user chooses. any thoughts ?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
|
|
|
So the value are the result of use interaction with the page? If so, then this is something that must be accomplished with JavaScript; JSP cannot help you.
|
 |
Kalyan Anand
Ranch Hand
Joined: Feb 07, 2007
Posts: 194
|
|
|
ok so I should gather the request parameters using javascript and when the user clicks on submit the same must be using to place the new request .. correct ?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
|
|
How to do it depends upon when and where you are gather ing the information from and how he request will be initiated.
Shall I move this to the HTML forum, or would you like to start a new topic there with more information provided?
|
 |
Kalyan Anand
Ranch Hand
Joined: Feb 07, 2007
Posts: 194
|
|
|
please move it to html.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
|
|
|
Done. Now we need more info.
|
 |
 |
|
|
subject: Multiple query parameters
|
|
|