Hello,
I have the following:
– textbox (txt_RegionName)
– button (btn_AddToList)
– listbox (lst_Regions)
I want to add text to listbox which I enter in the textbox on click of the button.
For example, If I enter “xyz” in the textbox >> [click button] >> Its should add in the listbox.
I am using the following code to do this but getting a diff result. The whole of the textbox is getting listed in the listbox. (pic attached)
[CODE]<script>
$(document).ready(function(){
$(“#btn_AddToList”).click(function(){
$(‘input[name=txt_RegionName]’).appendTo(“#lst_Regions”);
});
});
</script>
Plz tell me a solution.
Thanx
[upl-file uuid=9800abac-8890-4742-aa29-df056865e33f size=2kB]Administrator-Control-Panel.png