javascript method works localy but not on server
<p>The following JavaScript method works perfectly fine on local machine, but returns an error after uploading it to GoDaddy server:</p>

<pre><code>//add to saved profiles
function addFav() {
    /* opens a dialog */
    $("#addFavourite").dialog("open");
    /* error occurs in the next line */
    var profileName = document.getElementById("MainContent_lblMainName").textContent;
    SendMessageWebService.saveProfile(profileName);
};
</code></pre>

<p>i'm using google chrome browser for debugging</p>
