function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
usmanusman 

sforceClient.login fails with 'permission denied' error message

can someone please explain why this login call fails with 'permission denied' message? i am using IE 6.0 browser. I got same message with FF 1.0.3
 
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js?broswer=true" type="text/javascript">
</script>
<script language="JavaScript">
alert("1");
sforceClient.init(null, null, true);
alert("2");
var username = "admin@xyz.com";
var password = "testing";

alert(sforceClient.login(username, password));

</script>
Gareth DaviesGareth Davies

try removing the sforceClient.init call.

I use that call when initialising a session using an Session and API endpoint. I am not sure how well that will play together with the login call.

Gareth.

SteveBowerSteveBower
I'm being cheeky here, but what happens if you spell "browser" correctly on the sforceClient script directive?  :-)

Steve Bower

usmanusman
I fixed it by enabling 'Access data sources across domains' option in IE Tools\Internet Options\Security\Custome level.
JimmyC1228JimmyC1228
I had the same problem, which I fixed in IE by using your solution, but I can't find a similar workaround in Firefox.  Have you found one?  Thanks.