Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

prevent double click on buttons

Status
Not open for further replies.

morenos

Programmer
Mar 28, 2007
3
GB
Hello,

how can i prevent my buttons from double clicks. for example to be able to click then only once. i tried once clicked to return false
onclick(if document.myform.value){
return false
}
but then i cant click on the button at all.

and i tried other examples but it doesnt work and also i thought if the button is define as if(document.form.b1.value=="")
i thought that was preventing the double clicks but in this case it doesnt.

so any suggestions?
 
I'm lost on your English, but I think I can kinda understand. After the first click on the button, disable the button.

onclick function

Code:
function clickButton(obj) {
   obj.disabled = true;
}

This function will disable the button after it has been clicked on once.

[monkey][snake] <.
 
thanks i dont want to disable it i fount it eventually!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top