Hi friends, I have done one web application in which I have used almost HTML COntrols and Jquery ajax to call the web service and my web service is the main where I have my database. so I have uploaded in two diff. locations on to the server.
on local host I am very happy that I am able to call the service and I am able to Insert, Get and Update db values but when I uploaded into the server I am unable to call the service I mean when I am adding an Item through the jquery ajax call I am not even getting any errror nor success. I have changed the Url to the service location and also changed the Web.config file even though I am un able to get contact with the service.
how can I detect what the error may be?
My Service is working in IE only when I check in firefox and chrome the msg from a service is returns a null value.
here is my sample AddItem jquery ajax calls
try {
alert("In Add Item Js Function 2");
$.ajax
({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "http://bruhasapps.com/rentsvc/InventoryService.asmx/AddItem",
data: ItemDetails,
dataType: "json",
success: OnSuccess,
error: OnFail
});
alert("In Add Item Js Function 3");
}
catch (err) {
alert("Error in Add Items " + err.Message);
}
}
function OnSuccess(msg) {
alert("In Succ Fun " +msg);
var str = msg.d;
alert("Max Item Id " + str);
if (str !=null)
{
alert("Item Inserted Successfully");
$("#txtItemname").val('');
$("#txtMake").val('');
$("#txtModel").val('');
$("#txtYear").val('');
$("#txtDescription").val('');
document.getElementById('lstItemCode').selectedIndex = 0;
}
else
{
alert("There is some Problem in Inserting Data. Please Try again.");
}
}
function OnFail(request, status, error) {
$("#lblErrIname").html("Error Occured <br>" + request.responseText);
}
Please tell me some sort of solving technique
Thanks
Ganesh