Link to home
Create AccountLog in
Avatar of prain
prainFlag for United States of America

asked on

HTML Emable/Disable list boxed

Here is my scenario.

I have a list box and buttons.

1. At the start of the page I MUST set the listBox to Disable.
2. User Enters an input from a textfield, and then clicks a button. Based on  the validity of the input
   (say valid input) the listBox get enabled. Otherwise, the list box stays dsabled.

How to do this in HTML.?

prain
ASKER CERTIFIED SOLUTION
Avatar of nayernaguib
nayernaguib
Flag of Egypt image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of prain

ASKER

Actually in mine, the enable/disable will happen to a listBox and not a textbox. But user inputs data into a textbox.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Exactly. My example applies to any form control you have got. Just change the JavaScript statement to refer to the name of the desired control.

_______________

  Nayer Naguib
Avatar of prain

ASKER

Hello,

I split the points b/w the two of you as poth contributed. But Nayer gets more because he threw the first close solution and apot modified that a bit.