how to enable/ disable controls on a form

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
firdous_kind86
Forum Newbie
Posts: 8
Joined: Wed Oct 07, 2009 5:06 am

how to enable/ disable controls on a form

Post by firdous_kind86 »

Hi all,
i have a requirement that i have to enable/disable a specific textbox on a form based on the selected value from a combo box.

any help in this regard would be highly appreciated
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: how to enable/ disable controls on a form

Post by jackpf »

You can use the "disabled" property of the textarea :) Just set it to true.
firdous_kind86
Forum Newbie
Posts: 8
Joined: Wed Oct 07, 2009 5:06 am

Re: how to enable/ disable controls on a form

Post by firdous_kind86 »

yes but i have to do it on a selection value of a combo box, i mean it would require javascript function
that
if combobox.value =="??" then textarea.disabled = true (sumthing like this)
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: how to enable/ disable controls on a form

Post by jackpf »

Yeah, pretty much.

And execute the function with the "onchange" event of the select box.
Post Reply