Making Hyperlinks act like submit buttons

Started by
2 comments, last by Mulligan 20 years, 6 months ago
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?
Advertisement
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>

Post Extant Graphical MUD
Yup, worked, thanks.

what if i want them to be ''post'' instead of being attached to the url?
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 &#106avascript 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>

Post Extant Graphical MUD

This topic is closed to new replies.

Advertisement