I've this code
$.get(link, function(data, status) { document.getElementById("test").value = data; } }); $('#formtest').submit();
with Firefox work fine but with google chrome submit is done before "test" element change value. I want submit is done after $.get is done. How can i do this? Thanks
$.get needs some time to get response .So , place the .submit() code inside of function of $.get
It looks like this.
$.get(link,
function(data,status) {
$("#test").value = data;
$('#formtest').submit();
}
);