954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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

queenc
Junior Poster
145 posts since Mar 2008
Reputation Points: 9
Solved Threads: 4
 

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>
blufab
Light Poster
29 posts since Mar 2007
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You