I am calling a web services from client side on .aspx page, and I want to call a function on the success of this service.
The name of function will be passed as a parameter to this function, which will dynamically change.
I am passing it like this:
function funName parm1, parm2, onSucceedCallFuntion
function onSucceedCallFuntion(result)
//doing something here.
Perhaps because it's a string is why the "succeed" function could not be called
function funName(parm1, par2, onSucceedFunName) {
$.ajax({
url: "../WebServices/ServiceName.asmx/ServiceFunName",
data: JSON.stringify({
parm1: parm1,
par2: par2
}), // parameter map type: "POST", // data has to be POSTED
contentType: "application/json",
dataType: "json",
success: onSucceedFunName,
});
function onSucceedFunName() {}