Is it possible to submit a form by clicking on a standard text hyperlink, rather than a submit button or image?
| SitePoint Sponsor |
Is it possible to submit a form by clicking on a standard text hyperlink, rather than a submit button or image?
I did a quick Google search on this as I thought it was an interesting question and I found the answer on this site here http://www.willmaster.com/possibilit...31230001.shtmlhttp://www.willmaster.com/possibilit...31230001.shtml

Without looking at the link provided by Insane, you could use css to remove any styling from the submit button, though it probably wouldn't work cross browser.
Nadia
Unique CSS Templates by Nadia
Dreamweaver: Tutorials.Templates.CSS Designs
SitePoint Books |My Fireworks Tutorials 1 2
Follow me on Twitter | Community Team Advisor


It's possible using some JavaScript, but it's far better to style a submit button to look like a link.
The HTTP protocol states that GET requests (which is what you do with normal links) must be idempotent; i.e., they must not have any side effects. If your form is changing a database or a filesystem, you must not use GET. This means users don't expect any changes to be performed by clicking a link. Links are supposed to be 'safe'.
Birnam wood is come to Dunsinane
Why do you want to do that in the first place? I know from experience that the situations in which forms should be broken are next to none..
Whatever you may come up with, using a simple submit button will always be better :/



Darned good question. In general users know how forms and buttons work and are used to them. They have an idea of how these things work and more or less expect any page they visit to work that way.Originally Posted by SwordsmanX
Make them guess as to how to submit a form and you may find that, rather than do that, they simply go away, never to return.
Last edited by HAWK; Dec 9, 2012 at 18:02.
Ed Seedhouse
sure,
like this,
<input type="img" src="image's url" />
I'm glad to communicate technology of computer
Do This....
HTML Code:<form name="myForm" action="./gohere.php" method="GET"> <input type="text" /> <br /><br /> <a href="#" onClick="myForm.submit();">Click here to submit form</a> </form>


... and if JavaScript is disabled or unsupported, there is no way to submit the form.![]()
Birnam wood is come to Dunsinane
Bookmarks