Send to where? If you want to submit values to a server without leaving the current page, you may want to look into Ajax.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Behind the Web, Tips and Tricks for Web Development.
How would that work? Opening a link will move the user to the page the link is pointing to always.
You could conceivably open the link in an iframe so the user remains on the current page, but if the contents of the linked to page are on a different sever, you won't be able to interact with it.
Using Ajax's GET method may a better alternative.
You can call the page with any parameters you require in the url and have it return whatever it produces back to your JS script.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Behind the Web, Tips and Tricks for Web Development.
I'm sorry, now I'm confused. What exactly is to initiate the sending to a URL then, and how is that going to reflect to the user at all if nothing was clicked?
Perhaps if you can explain what you want to accomplish rather than the method of accomplishing it we could help you out more.
----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
Behind the Web, Tips and Tricks for Web Development.
You can use hidden forms to accomplish the same thing. The links would have an onClick() that invokes a function to populate the hidden form's fields with the values you want to pass.
For example, assume you want to link to a help facility and every page sets a 'currentPage' variable. Then,
* Your help link anchor event might be: onClick='return linkHelp(currentPage);'
* the hidden form (helpForm) would have an action attribute referring to the help page, and a field named helpTopicPage
* the linkHelp() function would set helpTopicPage.value = currentPage, then do helpForm.submit();
Note that the help page can also porovide a button to "return" since it has the original page name.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.