Making Hyperlinks act like submit buttons
I have a hyperlink on a webpage and when clicked on i want it to post a value to appear as a query string on the page it opens. Is that possible with a plain link?
If you just want to pass values in the query string, you can include them in the URL.
<a href="page.html?name=value">Click me</a>
quote:Original post by Mulligan
Yup, worked, thanks.
what if i want them to be ''post'' instead of being attached to the url?
Easiest way I know is to use javascript to post a form.
<form name="sample" action="test.html" method="post"> <input type="hidden" name="name" value="value"></form><a href="javascript:document.forms.sample.submit();">Click</a>
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement