JavaScript Submit button hack

This item was filled under [ JavaScript ]

Thanks for visiting! If you're new here, you may want to subscribe to my Rss Feed. This blog posts regular Internet news, updates for apps, security, ideas, hacks, quick fixes and everything about hi-tech. Go ahead, Subscribe to our Feed or Register for Free!

submit-button-javascript-hack

On slow server or double clicks often we have double post and double comments on blogs forum, forms, uploading etc. Here is a fast JavaScript hack that can disable the Submit button after the first click. So after the users click submit, the button will be inactive for other incidental clicks. Just with adding this following line to your form inside the "input submit" tag:


onclick="myform.submit();this.disabled=true

here is the an example:

<form name=myform action="form.php" method=post">

<input type="submit" value="Submit" onclick="myform.submit();this.disabled=true">

</form>

And here is a visual when I clicked on Host:

javascript-hack-Host

Hope you enjoy this short guide.

Popularity: 448 reading
If you like this entry, consider bookmarking or help us promote it. Thank You!
Interesting Articles:

Related post to "JavaScript Submit button hack"

  • SWFUpload is back with v2.2.0 beta Release

    SWFUpload is back with a beta Release. SWFUpload is a small JavaScript/Flash library to get the best of both worlds. It features the great...


  • Future features for Google Gmail

    From Gmail Labs comes out some experimental features that will be integrated to Gmail. Some of this are user suggestions as: Custom label...


  • Sexy Alert Box with MooTools

    The author decided to call SexyAlertBox and is a mod to change the default style of JavaScript Alert Box. This script use MooTools to create...


  • Cool font for website with facelift

    Facelift Image Replacement (or FLIR, pronounced fleer) is an image replacement script that dynamically generates image representations of text...


  • Vista Gadgets without Sidebar

    Two days before I post a short guide How to reset Windows Vista Gadgets. Today another hack how to use Vista gadgets without the sidebar. Here...


  • Change color and size of mouse pointers in Windows Vista

    In Windows Vista we  can choose a mouse pointer scheme to increase visibility of the mouse pointer on the screen. Here is a quick way to do:...


  • Hack to Firefox search tab

    When we search often we use the search box on the top of Firefox, and very often we open a new tab. Here is the hack how to make this tab in an...


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Comment