The name attribute is deprecated for the form element. Using an id ist
good practice.

--Klaus

On 4 Feb., 14:41, Liam Potter <radioactiv...@gmail.com> wrote:
> why you using get element by id?
>
> make sure your form has a name ( <form name="myform"> )
>
> then use this
>
> <a class="button" href="javascript://document.myform.submit();">Send</a>
>
> ||
>
> Tintin81 wrote:
> > Hi,
>
> > I have a very simple contact form that I would like to submit using an
> > anchor rather than an input tag. This is what I've got so far:
>
> > [code]<a class="button" href="javascript:{}"
> > onclick="document.getElementById('contact-form').submit(); return
> > false;">Send</a>[/code]
>
> > Unfortunately, it doesn't work :-(
>
> > Can anybody help me with this?
>
> > Thanks a lot...

Reply via email to