DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   submit button (http://www.daniweb.com/forums/thread120947.html)

queenc Apr 25th, 2008 6:16 am
submit button
 
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

blufab Apr 25th, 2008 10:45 am
Re: submit button
 
I would use the disable property on a onclick event.

<html>
<head>
<script type="text/javascript">
function disableOption()
{
document.getElementById("but").disabled=true;
}
</script>
</head>
<body>

<form>
<input id="but" type="button" onclick="disableOption()" value="Disable">
</form>

</body>
</html>


All times are GMT -4. The time now is 7:30 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC