You can use the jmlHttpRequest javascript method to get a response from the server or you can use the jQuery http://jquery.com/ plugin in your application and play with the ajax jquery function.
$.ajax({ url:'stringURL', beforeSend: function(x) { x.setRequestHeader('Authorization','username/pwd'); }, dataType:"xml", contentType:'application/xml', timeout:10000, type:'POST', success:function(data) { alert(data); }, error:function(XMLHttpRequest,textStatus, errorThrown) { alert("Error status :"+textStatus); alert("Error type :"+errorThrown); alert("Error message :"+XMLHttpRequest.responseXML); } });
Mayur birari
source share