<form action="#">
    <select name="groupid" id="groupid">
      <option>Slower</option>
    </select>
    
</form>

<script>
$.getJSON( "AjaxGroup.php?action=list", function( data ) {
  if(data.Result=="OK"){
    var sel = $("#groupid");
    sel.empty();
    for (var i=0; i<data.Records.length; i++) {
	sel.append('<option value="' + data.Records[i].GroupId + '">' + data.Records[i].Name + '</option>');
    }					
  }			  
});
</script>

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is www.looptek.com

Leave a Reply