| Author |
Inserting parameters into hyperlink dynamically
|
Rajesh Khan
Ranch Hand
Joined: Oct 16, 2011
Posts: 230
|
|
Hi i wanted to know if there was a way to insert content into a hyperlink dynamically. I mean i have something like this in table cell.
but Flink() is a javascript function which has a variable and a value which needs to be appended to the link so the link should like like this in the end
Is there any way in which i could make java script append that value ?? The only way i thing that is possible is to assign it a id. Traverse through the dom and then change the inner text.If i do that I still think it wont work since the link has already been clicked.
|
 |
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1008
|
|
If the parameters to pass are well defined, one easy approach is to define a form with the parameters you want, then populate the input fields and submit the form via javascript.
Another would be to build up a url in a javascript string (don't forget to escape the necessary values), and then set it via window.location.href
All of that is javascript rather than JSP.
something like this:
|
 |
 |
|
|
subject: Inserting parameters into hyperlink dynamically
|
|
|