View Full Version : submit form using textlink

12-23-2004, 07:00 PM
i discovered this code to submit form using text link
<a href="javascript:document.MyForm.submit();">search</a>

now my question is if i want to submit to search.php?country=us
how can i do?

Willy Duitt
12-23-2004, 09:18 PM
The form still needs to have a form action to submit to... Set the form action accordingly....

Then again, it should be pointed out that by not using form elements as intended, your form will not work for those with javascript disabled... If you do not like the button, try using type=image instead....