+ Start a Discussion
ClintHegneyClintHegney 

Error when using sforceClient.Login function

Tried using the following line in a btnLogin_Click() function call and received an the error below.

var loginResult = sforceClient.Login(document.getElementById("txtUserName"), document.getElementById("txtPassword") );



Line: 721
Char: 3
Error: 'Sforce.Util.time_object' is null or not an object
Code: 0
URL: <url>


Was I supposed to set this object some where before calling the Login function
Ron HessRon Hess

you may want to try

document.getElementById("txtUserName").value


otherwise you are not passing a string, but an HTML element  

ClintHegneyClintHegney
That was an error on my part, but it is not the cause of the error in my previous post. I should tell you, I only get the error if I use a script link to an sforceclient.js stored locally rather than linking to the sforceclient.js on the web. Obviously, this is making a difference, but why? Is it possible to have a local copy of these library for cross domain security issues?