Mar 25, 2009, 11:14 AM
[CLOSED] Error if AjaxMetod returns ""
Hi I got an error in this javascript if the ajaxmetod returns "". Really annoying. A bug, or is it my misstake?
[AjaxMethod]
public string GetUserWithNewMessage()
{
return "";
}
function updateUserStatus()
{
Coolite.AjaxMethods.GetUserWithNewMessage({success: onUpdateUserSuccess});
}
function onUpdateUserSuccess(result)
{
try
{
if (result != "") <-- ERROR if AjaxMetod returns ""
alert(result);
}
catch(e)
{
Ext.Msg.alert('Error',e.message);
}
}
/Mikael