Help - Search - Members - Calendar
Full Version: passing values through links
HTMLHelp Forums > Programming > Client-side Scripting
rocker
need some help on another problem related with external links..

i have a webpage A as a form with its action element set to a java servlet. However,within this page i have a link to another webpage B, (through the <A HREF.. .. </A> tag).
I need to pass some value generated at runtime from page A to B through this link,Is there a way??
Christian J
What does runtime mean in this context?

If you give the link a query string value like <a href="page_B.html?foo=bar">Page B</a> it can be fetched by a server-side script at the URL page_B.html. But in that case you will not use the form at page A.

If you mean pass the value without submitting the form, you might use http://en.wikipedia.org/wiki/AJAX but there's not need for a link then (you could disabled the link with javascript "return false").

If you mean saving the value until the form on page A is submitted you can assign it to a hidden form field. Again the link should be disabled.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.