I'm trying to create list of countries using javascript function such as :
<div id='content'>
<script type="text/javascript">
$(document).ready(function () {
var countries = new Array("Afghanistan", "Albania", "Algeria", ...);
// Create a jqxComboBox
$("#jqxComboBox").jqxComboBox({source: countries, multiSelect: true, width: 600, height: 25});
$("#arrow").jqxButton({ });
$("#arrow").click(function () {
$("#jqxComboBox").jqxComboBox({ showArrow: false });
});
.
.
.
But I'd like to change the source of var countries to be taken from my database, my sql query is $q = "SELECT country FROM countrytbl";
I'm still beginner in js so have no idea about how to do that!!
Note: each country should be in two quotations "" in order to make the list works