I have written a javascript function that calls a web service to save data. When the web service is called an alert pops up saying the server method saveUpdateCodes failed, and it gives no other information. The thing is the web service executes and throws no errors (I've stepped though it). Also, the alerts in the catch in the javascript code never happen. Does anyone no how this can happen? Could it be the browser, my code...? For testing, I am using Firefox w/ the firebug plugin. The javascript code is below, if you need more information, please ask. Thanks.
This is the call to the web servcie
try
{
//debugger;
//call the service to do the save
codeList.editcodes.saveUpdateCodes(sUsrList, sCharge, sCodes, sId, afterSave, OnsaveUpdateCodesFailure);
//close the progress panel
hideProgress();
}
catch(e)
{
//debugger;
alert(e.description);
alert(e.number);
}
These are my onSuccess & onFailure functions
function afterSave(result)
{
//the web service returns an empty string on success & a err message onFailure
//if the save was successfull, go to the previous page
if (result == '')
history.go(-1);
else
{
alert('There was an error saving the data. Please try again');
//may need to go back here
}
hideProgress();
}
function OnsaveUpdateCodesFailure( result )
{
alert( result.get_message() );
//history.go(-1);
//debugger;
}