Hi,
someone kindly posted the following solution to consuming web services from this question at this link:
function InfoByDate(sDate, eDate){
var divToBeWorkedOn = '#AjaxPlaceHolder';
var webMethod = 'http://MyWebService/Web.asmx/GetInfoByDates'
var parameters = "{'sDate':'" + sDate + "','eDate':'" + eDate + "'}"
$.ajax({
type: "POST",
url: webMethod,
data: parameters,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
$(divToBeWorkedOn).html(msg.d);
},
error: function(e){
$(divToBeWorkedOn).html("Unavailable");
}
});
}
It all goes well, and the data that I want is returned, BUT, I always get a warning from IE about 'This page is accessing information which is not under its control. This poses a security risk ... etc', and with Opera the information does not load because of a "Security violation" error.
How do I overcome this - I really need to stick with javascript because the code has to be placed in pages where I do not have access to the server programming facilities.
Thanks people.