ajax

January 25, 2015   ·   0 Comments

Screen Shot 2015-01-25 at 11.26.02 AM

<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>

shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
jQuery172

jQuery

Amazon

adsbygoogle

Recent Posts

Categories

Amazon