You need to sign in to do that
Don't have an account?
unikevin
if (sforceClient.getSessionId().indexOf("!API_Session_ID") != -1)
ajax beta1 error when login using "http://..."
hi,
I'm using ajax beta1 and find it works well in S-control.
But when I put it on my server and using the address eg "http://localhost:8080/test.html" , A "no permission error" occurred.
The code I using:
sforceClient.init("{!API_Session_ID}", "{!API_Partner_Server_URL_60}");
if (sforceClient.getSessionId().indexOf("!API_Session_ID") != -1)
{
var lr = sforceClient.Login("admin@xxx.com", "xxxx"); // error occurred here , no permission.
}
else {
...
}
The strange thing is : if I use "file:///c:/tomcat/.../test.html" to access the file, it works properly well!
so, why can't I use my own hard code account infomation to login salesforce when using "http://" prefix?
First login salesforce in a local jsp file, like login.jsp , and replaced
sforceClient.init("{!API_Session_ID}", "{!API_Partner_Server_URL_60}");
with
sforceClient.init(GetCookieValue('sid',base64decode(getCookie('sinfo'))), GetCookieValue('endpoint',base64decode(getCookie('sinfo'))));
in my ajax html file,then it works fine!
So, does the IE security setting cause the permission problem?