AJAX Databinded DropDown Option Property
-
I Have a dropdown which the user can add items to using AJAX but I need to prevent Duplicates. the dropdownlist.Options[index].value returns a number because of the way i'm databinding (i cannot change this). Is there a Javascript property for the Name That will get me the text in the option tags rather than the value?
-
I Have a dropdown which the user can add items to using AJAX but I need to prevent Duplicates. the dropdownlist.Options[index].value returns a number because of the way i'm databinding (i cannot change this). Is there a Javascript property for the Name That will get me the text in the option tags rather than the value?
The following function is called upon the onBlur event of the textbox control (txt). The following code does not work. Description of the function is: Search the ddl (an asp dropdown) for duplicates of the text in txt (asp textbox). Btn is an Asp.net Button that produces a postback and triggers the update panel in which only the ddl resides. function CheckCaller() { var txt = document.getElementById("txtAddCaller"); var btn = document.getElementById("Button1"); var ddl = document.form1.ddlCaller; var caller = trimAll(txt.value); var found = "false"; if (caller != "") { for (i=0; i
-
The following function is called upon the onBlur event of the textbox control (txt). The following code does not work. Description of the function is: Search the ddl (an asp dropdown) for duplicates of the text in txt (asp textbox). Btn is an Asp.net Button that produces a postback and triggers the update panel in which only the ddl resides. function CheckCaller() { var txt = document.getElementById("txtAddCaller"); var btn = document.getElementById("Button1"); var ddl = document.form1.ddlCaller; var caller = trimAll(txt.value); var found = "false"; if (caller != "") { for (i=0; i