PDA

View Full Version : I need some button help!


Smooth24
05-11-2004, 09:47 PM
Alright I'm somewhat experienced with JavaScript but a friend of mine stumped me with this:

He's looking for a code that when he clicks on a button on a page, the button then becomes disabled.

I told him I'm sure this is very possible but wasn't sure quite how to code that myself. I've looked around for a few minutes but figure it would be much faster if I posted this and maybe someone could answer.

Thanks guys (and gals)! :D

Jeremy Hamilton

sad69
05-11-2004, 10:02 PM
Like this:

<button onClick="this.disabled = true">click</button>


Then when you want to enable it again, you just set disabled = false;

Hope that helps,
Sadiq.