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>

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 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:48 UTC