User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 374,195 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,532 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 491 | Replies: 1
Reply
Join Date: Mar 2008
Posts: 68
Reputation: queenc is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 2
queenc queenc is offline Offline
Junior Poster in Training

submit button

  #1  
Apr 25th, 2008
hi,
i have a form where the user can post data.But in my application when the click more than once ...data is getting inserted more than once.so i want to allow the user to clickonly once in every 10 sec.please do send some sample code
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2007
Location: GA
Posts: 27
Reputation: blufab is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
blufab blufab is offline Offline
Light Poster

Re: submit button

  #2  
Apr 25th, 2008
I would use the disable property on a onclick event.

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function disableOption()
  5. {
  6. document.getElementById("but").disabled=true;
  7. }
  8. </script>
  9. </head>
  10. <body>
  11.  
  12. <form>
  13. <input id="but" type="button" onclick="disableOption()" value="Disable">
  14. </form>
  15.  
  16. </body>
  17. </html>
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:07 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC