peps03
asked on
Find specific word(s) in selected option value if matching fill next field value
Hi,
I'm trying to get jQuery to get the value of a selected option in a html form and scan that selected value if it contains one of the predefined (sets of) words.
if it does, that words must be entered as value in the next text field.
Predefined set of words: 'New York', 'LA', 'London'
<select>
<option>School of New York</option>
<option>School of LA</option>
<option>School of Business</option>
<option selected>School of London</option>
</select>
next field: input type="text" >> value='London'
Is this possible??
Thanks!
I'm trying to get jQuery to get the value of a selected option in a html form and scan that selected value if it contains one of the predefined (sets of) words.
if it does, that words must be entered as value in the next text field.
Predefined set of words: 'New York', 'LA', 'London'
<select>
<option>School of New York</option>
<option>School of LA</option>
<option>School of Business</option>
<option selected>School of London</option>
</select>
next field: input type="text" >> value='London'
Is this possible??
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@ anuradhay thanks, but i think you use asp, i don't
@Proculopsis, thanks!!! great! it works like a charm!
@Proculopsis, thanks!!! great! it works like a charm!
Its is not asp. You can simple use input type button and on click it validates.
Open in new window