I have a javascript method snippet as below
var  tempUrl = "http://A.com:8081/TestService/serviceMethod";  
jQuery.ajax({  
url:tempUrl,  
type: 'POST',  
data:"getDatareq="+encodedata,  
contentType: 'application/json',  
dataType:'text',  
success:function(result){  
jQuery(".loadingMsg").html("");  
jQuery(".loadingMsg").hide();  
getApptDtls(result);  
},  
complete:function(result){  
jQuery(".loadingMsg").html("");  
jQuery(".loadingMsg").hide();  
jQuery(".popupContent").show();  
jQuery.unblockUI(); 
I am including this method in an html which is hosted in another server with url http://B.com:8081
When i run this html and call this method , the serviceMethod in A.com is not getting hit . What could be the problem here?
Any help is greatly appreciated.
 
     
     
    