Hi All,
I am fresh to PHP.
I am trying to play with combobox and text field on same page.
Combo box has 'yes' and 'no' options.If 'yes' option is sected the text field should be enabled on same page and if 'no' option is is selected the text field should be disabled.
I should not submit the page by a button click to enable/disable the text field.It should happen only with selection.
If any body has any idea or code to share please help!!!
Regards,
-Manoranjan
Selecting combo item should enable/disable the text box
Moderator: General Moderators
-
mana_panigrahi
- Forum Newbie
- Posts: 10
- Joined: Fri May 08, 2009 8:22 am
- turbolemon
- Forum Commoner
- Posts: 70
- Joined: Tue Jul 14, 2009 6:45 am
- Location: Preston, UK
Re: Selecting combo item should enable/disable the text box
Your asking in the wrong place. What you are asking is a client-side scripting question (i.e. JavaScript). Its easy though, you need to add an onchange event to the select element which toggles the disabled attribute on the textarea/input field.