PDA

View Full Version : Can you submit a form using a link instead of the submit button?


elcaro2k
10-15-2002, 03:45 PM
Is there a way to submit a form using a link instead of a button? Or is there some other event that will submit a form?

allida77
10-15-2002, 04:39 PM
onClick="document.myform.submit();"

put that in your <a href>,<button>, or any other appropiate tag

whammy
10-16-2002, 12:20 AM
Of course, replace myform in that code with the actual name of your form.

P.S. Just a tip - it might be a good habit to name your forms like this to get in the habit of being XHTML compliant (since "name" is deprecated):

<form id="myform" action="something.ext" method="post">