Link to home
Start Free TrialLog in
Avatar of diecasthft01
diecasthft01

asked on

Javascript if with a wildcard

Good morning. I have a snippet of javascript code that basically just turns on a new text box if a drop down box is selected. The code is specific to a certain number selected, so if 'A.0022684.1.1.4' is selected, it displays a new text box.

if (value == "A.0022684.1.1.4"){
          showElement(thatObject.name);

What I'd like to do is instead of using a specific number, Id like to use a wild card...so that if and number selected starts with 'A.' then the new text box will display. I'm no javascript whiz so I was hoping a wildcard could be used somewhat easily.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of diecasthft01
diecasthft01

ASKER

Yup...that did exactly what I was looking for!!! Thanks!!!