AnnIsabelle
Programmer
I send the following question to the html-forum and they said to ask here:
Hi,
I'm making a form with a button on it. The button has an onClick-event that calls a function. After the first time the user has clicked the button,I want to disable it. This way the user can only click once. I need this because the function I call checks the answer given by the user and, if correct, increases a score. Now the user can click an indefinite number of times and augment the score.
Thanks,
AnnIsabelle
>An answer from MikeBarone (Programmer) Apr 12, 2001
>I have seen it done using a toggle variable. After it is >clicked once it changed the onclick event to onblur whick >keeps them from clicking it again.
>You can get the actual code from JavaScript pros over at >that forum.
Hi,
I'm making a form with a button on it. The button has an onClick-event that calls a function. After the first time the user has clicked the button,I want to disable it. This way the user can only click once. I need this because the function I call checks the answer given by the user and, if correct, increases a score. Now the user can click an indefinite number of times and augment the score.
Thanks,
AnnIsabelle
>An answer from MikeBarone (Programmer) Apr 12, 2001
>I have seen it done using a toggle variable. After it is >clicked once it changed the onclick event to onblur whick >keeps them from clicking it again.
>You can get the actual code from JavaScript pros over at >that forum.