JS Error:Cannot call method of null

Posted by Nadeem on Stack Overflow See other posts from Stack Overflow or by Nadeem
Published on 2010-04-26T07:23:16Z Indexed on 2010/04/26 7:33 UTC
Read the original article Hit count: 185

Filed under:

I have the following method in a js file in ASP.Net web project. This method is giving the error Cannot call method 'split' of null

 function loadUser_InfoCallBack(res)
    {
    var ret=res.value;
    var senderGUID = ret.split(';')[0];
    var senderText = ret.split(';')[1];

    if(senderGUID.Length>0)
    {
    $('hiddenSender.value')=senderGUID;
    $('hiddenText.value')=senderText;
    }

}

Can anybody suggest the reasons for this error..

© Stack Overflow or respective owner

Related posts about JavaScript