manishsawant
MIS
Hi,
I have a textbox and a combobox. I have written code to select a value from the combobox when the user start typing in the textbox(onChange).
var Type = document.getElementById('cmbType');
var TypeText = 'Select Type';
if(Type.options[Type.selectedIndex].text == TypeText)
{
document.getElementById('cmbType').selectedIndex = 2;
}
Now when the user select 'Select Type' and start removing the value from the textbox still the index is changed to 2, which is incorrect. Can there be a work around for this.
Thanks,
Manish
I have a textbox and a combobox. I have written code to select a value from the combobox when the user start typing in the textbox(onChange).
var Type = document.getElementById('cmbType');
var TypeText = 'Select Type';
if(Type.options[Type.selectedIndex].text == TypeText)
{
document.getElementById('cmbType').selectedIndex = 2;
}
Now when the user select 'Select Type' and start removing the value from the textbox still the index is changed to 2, which is incorrect. Can there be a work around for this.
Thanks,
Manish