Skip to content

Instantly share code, notes, and snippets.

@ankitkanojia
Created September 2, 2019 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankitkanojia/23a0ea45e0d377faa4339519c4f649b5 to your computer and use it in GitHub Desktop.
Save ankitkanojia/23a0ea45e0d377faa4339519c4f649b5 to your computer and use it in GitHub Desktop.
Call ajax from any platform using jquery library
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
function functionName(){
$.ajax({
type: "POST",
url: "URL",
data: '{parameterName: "' + parameterValue + '"',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
//success return
},
failure: function (response) {
//error return
}
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment