Ajax post example [Jquery]
HTML
<script src="http://jquery-json.googlecode.com/files/jquery.json-2.2.min.js"></script>
JavaScript
var data = {
json: $.toJSON({
text: 'some text',
}),
delay: 3
}
var i = 7;
$.ajax({
url: 'http://61.219.134.117/careerhttppost2.asp',
data:data,
type:"POST",
success:function(response)
{
i=8;
console.log(response);
console.log(i);
whatIsVarValue('after success');
}
});
whatIsVarValue('before success');
function whatIsVarValue(s)
{
alert("Value of var "+s+" is " + i);
}