using text instead of convencial submit button

If we want to submit form using text instead of convencial submit button then follow the article.

We’ve have to use following javascript code on click event.

	document.formname.submit()

For Example:

<form action='newsletter/index' name='newsletter'>
<input type="text" name="email" class="smalltxt" /><br />
<a href="javascript:;" onclick="document.newsletter.submit()">Submit</a>
</form>
 
Hope this will help you.
Category(s): Javascript

Leave a Reply

Your email address will not be published. Required fields are marked *

*

 

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">