W3C home > Mailing lists > Public > www-html@w3.org > June 1998

Re: Submitting a form using a hypertext link??

From: Rasmus Kaj <kaj@interbizz.se>
Date: Thu, 4 Jun 1998 14:55:58 -0400 (EDT)
To: Jason.Katonica@ogs.state.ny.us
Cc: www-html@w3.org
Cc: kaj@interbizz.se
Message-Id: <19980604205602U.kaj@interbizz.se>
>>>>> "KJ" == Katonica, Jason <Jason.Katonica@ogs.state.ny.us> writes:

 KJ> Hi I was just wondering how and if its possible to submit a
 KJ> <form> using a html link rather than the usual submit button.

I'm not sure this is quite on topic, but here goes ...

It is possible by using javascript, something like this:

<form name="foo" ...>
<a href="javascript:this.document.foo.submit();">Submit</a>
</form>

Note that, this way, the submit link don't need to be contained in the
form.  I don't like this way, it seems to much of a cludge to me, but
I've found I had to use it ...

// Rasmus

-- 
kaj@cityonline.se --------------- Rasmus Kaj - http://www.e.kth.se/~kaj/
 \               CityOnLine IB Production AB - http://www.CityOnLine.se/
  \------------------- Jäkt är bara tecken på dålig organisationsförmåga
Received on Friday, 5 June 1998 03:42:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:37 GMT