Hello i am new to javascript. I need to return multiple values from the table. Currently jscript returning only the first value from the table.
My javascript
<script>
jQuery(document).ready(function($){
$("#countryDropDown").change(function()
{
var country=$(this).val();
function fillStateDropDown(countryStateOption)
{
$.each(countryStateOption, function(val, text) {
$('#stateDropDown').append(
$('<option></option>').val(val).html(text));
});
}
function clearStateDropDown()
{
$('#stateDropDown option:gt(0)').remove();
}
if(country=='Art1')
{
clearStateDropDown();
var indiaStateOption={
'<?=$row['service']?>' : '<?=$row['service']?>',
};
fillStateDropDown(indiaStateOption);
}
php code
<?php
$select=mysql_query("select * from service where status=1") or die(mysql_error());
while($row=mysql_fetch_array($select)){
?>
Table values
A | b | v | v |
Currently returning the first value A but I need to print all the values. Thanks