cleanair4me
Technical User
- May 16, 2008
- 61
I have a function that works with input text onblur but wont work with select option.
Here is example of how it works with input text where the user enters a city and populateFullname() function automatically populates the fullname field with a value:
If I try the same attempt for select option where I can only select one value it doesnt work using onBlur.
I also tried using onChange, onFocus and onSelect but it didnt populate the fullname value.
Please advise any other things I can try that can work with select option?
Here is example of how it works with input text where the user enters a city and populateFullname() function automatically populates the fullname field with a value:
Code:
<input type="text" name="city" onBlur="populateFullname();">
<input type="text" name="fullname">
If I try the same attempt for select option where I can only select one value it doesnt work using onBlur.
I also tried using onChange, onFocus and onSelect but it didnt populate the fullname value.
Code:
<select name="city" onChange="populateFullname();" onFocus="populateFullname();" onBlur="populateFullname();">
<option value="Oakland">Oakland</option>
<option value="Cleveland">Cleveland</option>
<option value="Boston">Boston</option>
</select>
<input type="text" name="fullname">
Please advise any other things I can try that can work with select option?