Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to submit a form using a hyperlink

Status
Not open for further replies.

gtbikerider

Technical User
Joined
May 22, 2001
Messages
81
Location
GB
I guess this isn't strictly a CF question, but how do I use hyperlinked text to submit a form. My guess is I have to use javascript along the lines of:

<form name=&quot;go&quot; id=&quot;go&quot; action=&quot; method=POST>
<input type=hidden name=&quot;stuff&quot; value=&quot;somestuff&quot;>
<a HREF=&quot;javascript:go();&quot;>submit</a>
</form>

(But that doesn't work) Can CF help?

--
John
 
You are correct that you can do this using JavaScript. Try this:


<form name=&quot;go&quot; id=&quot;go&quot; action=&quot; method=POST>
<input type=hidden name=&quot;stuff&quot; value=&quot;somestuff&quot;>
<a HREF=&quot;javascript:document.go.submit();&quot;>submit</a>
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top