Click here to Skip to main content
15,901,368 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have combo box and text box when combo box text is changed or leave the focus then combobox text will appear in text box. so how can i to do this pls help me

Thanks in advance
Posted

1 solution

Try this javascript function:-

C#
function chkind(){
    var dropdown1 = document.getElementById('dropdown1');
    var textbox = document.getElementById('textbox');
    var selectedText = dropdown1.options[dropdown1.selectedIndex].text;
    textbox.value =selectedText;
}
 
Share this answer
 
Comments
MANI 14 22-Oct-13 0:44am    
selectedIndex is k. Here combo box is write mode then newly enter a text without selecting then how to find that text box plss help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900