Skip to content

Instantly share code, notes, and snippets.

Created August 17, 2012 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save anonymous/3380313 to your computer and use it in GitHub Desktop.
Save anonymous/3380313 to your computer and use it in GitHub Desktop.
function callAjax(){
$.ajax({
url: "url",
data: {
value: "derp"
},
dataType: "json",
success: function(data){
//do stuffs
},
error: function(){
alert("error!");
}
});
}
<select class="select " id="" name="" required="" onchange="callAjax()">
<option value=""></option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
<option value=""></option></select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment