Change Submit Button Text Upon Form Submission Javascript

Working on a little project and wanted one of those fancy effects where when someone fills out an email submission form, the text changes from ‘Submit’ to something like ‘Please wait…’ or ‘Sending…’. A few seconds of Googling and voila:
<form name=”form_name” action=””><input type=”submit” name=”button_name” value=’Submit’ onClick=’form_name.button_name.value=”Please Wait…“;return true’></form>
I annotated the colors of the different fields you have to pop into the onClick statement.

This entry was posted in General on by .

About Andy Wibbels

Andy is an award-winning blogger and author of the book Blogwild! A Guide for Small Business Blogging. His work has been featured in The Wall Street Journal, USA Today, Entrepreneur, Wired, Business Week, Forbes, and other national and international media. He was worked at several San Francisco startups including Typepad, Get Satisfaction, SInMobi, Keas, and Mindjet. Currently, Andy is Director of Marketing at Lucidworks. Tw · Fb · G+ · Li

1 thought on “Change Submit Button Text Upon Form Submission Javascript

Leave a Reply

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