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

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>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.