views:

607

answers:

4

Using Prototype, the Form.Element.disable is said to be disabled the form as a whole. Is there any way to disable only one single input element at a time?

And when I try this:

$$('#signup .button')[0].disbled = false; ## didn't work

Updated

Sorry for all. Actually it works. But I have defined a disabled style in a stylesheet and the style doesn't got applied. Is there any workaround?

+2  A: 

You want the disable method.

http://api.prototypejs.org/dom/form/element.html#disable-class_method

For example:

$(id).disable();
twernt
A: 

This should work:

$$('#signup .button')[0].disable();
tricat
A: 

Try this:

$$('#signup .button').disable()

Or:

$(id_of_element).disable()

Or:

Form.Element.disable(id_of_element)
mlen
A: 

how to enable the disbaled input field as disable will disable the input field how to remove the disbaled() :?

smarika