|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DropDownList(ddlist) and TextBox(tbox)i have dropdownlist(ddlist) and textbox(tbox) , i want that if a user types
sometihing in the textbox(tbox), the values present in the ddlist should appear e.g. my ddlist has 3 values (india,indonesia,germany), if user types in text box like "i" then dropdown control should go to "india" and 'indonesia" (not to germany) and if he types "n" the then it be on india,indonesia and if he types "d" after "in" in text box then control should be on "india" ,indonesia" and if he types 4th letter say "i" then control shoudl select 2nd value which is "india",in this way the procseesing should be done..there must be no postback, i know it can be done with the help of javsscript but how..plz help me ,Thnaks in adavce to everyone who will try to do this Write a function on textbox keypress event and start comparing the text in
text box with the dropdown something like var option =document.getelementbyId("dropdown1")getelementsbytagname("option") for (var i=o;i<option .length;i++) { var value=do a substring of this value equal to textboxtextlength( option(i).value) if(textbox1.text==value) { option(i).selected="selected"; } } Show quoteHide quote "deepak" wrote: > i have dropdownlist(ddlist) and textbox(tbox) , i want that if a user types > sometihing in the > textbox(tbox), the values present in the ddlist should appear e.g. > my ddlist has 3 values (india,indonesia,germany), if user types in text box > like "i" then dropdown > control should go to "india" and 'indonesia" (not to germany) and if he > types "n" the then it be on india,indonesia > and if he types "d" after "in" in text box then control should be on "india" > ,indonesia" and if he types 4th letter > say "i" then control shoudl select 2nd value which is "india",in this way > the procseesing should be done..there must be no postback, i know it can be > done with the help of javsscript but how..plz help me ,Thnaks in adavce to > everyone who will try to do this > >
ASP.NET 2.0 Menu Control - DynamicEnableDefaultPopOutImage Property
CSS class for a div tag Role based security Tabbed control for ASP.NET pages Could not load type XXXXXX from assembly mscorlib Tree View DragNode Datagrid empty data hides header asp button click handler Low level programing in ASP .Net Find the source of an event |
|||||||||||||||||||||||