954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Pass hidden varible on clicking hyperlink

How to pass a hidden variable to servlet/action class on clicking of a hyperlink in jsp page.

prabhabati
Newbie Poster
1 post since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

Create an HTML form with a hidden field containing the value of the variable and the action attribute pointing to the servlet you want to call
Finally On click of the Hyperlink, use javascript to perform a post action on the form.

A few references:-
Calling a javascript function in Hyperlink.
Submit a form via javascript

stephen84s
Nearly a Posting Virtuoso
1,443 posts since Jul 2007
Reputation Points: 668
Solved Threads: 154
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You