Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textbox onchange issue 1

Status
Not open for further replies.
Apr 11, 2002
193
0
0
IN
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top