Skip to content

Instantly share code, notes, and snippets.

@marceloxp marceloxp/gist:5731211
Last active Dec 18, 2015

Embed
What would you like to do?
AjaxRequest
function AjaxRequest(args)
{
try
{
$.ajax
(
{
url: "arquivo.php",
type: "POST",
data:
{
"dt1" : 1,
"dt2" : 2
}
}
).done
(
function(data)
{
if (data == "OK")
{
}
else
{
alert("Falha na captura da imagem");
}
}
).fail
(
function(jqXHR, textStatus)
{
alert("Falha: " + textStatus);
}
);
}
catch(err)
{
alert("Erro: " + err.message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.