How can we bind the select tag with variable data? ..
Here is my sample code here.
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script> var google.language.Languages = { 'AFRIKAANS' : 'af', 'ALBANIAN' : 'sq', 'AMHARIC' : 'am', 'ARABIC' : 'ar', 'ARMENIAN' : 'hy', 'AZERBAIJANI' : 'az' ... } </script>
I want to bind my select tag using the above languages
<select id="langsel" name="selector"> <option value="">Select a language</option> </select>
How to bind " langsel " to the above variable.?
I need the output as below :
<select id="langsel" name="selector"> <option value="">Select a language</option> <option value="af">AFRIKAANS</option> .... </select>
jquery jquery-selectors javascript-framework
Abhishek B.
source share