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
apurswaniapurswani 

Access Denied while calling salesforce page using javascript......

<script type="text/javascript"> function loadXMLDoc() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","https://na7.salesforce.com/secur/frontdoor.jsp?sid=00DA0000000awHA!AQIAQAnIQGwxFcWZSZ2ptgH50O8NvMGdF4mfE2qCiCpO8nIiqeGdDobQkAZng1NvrwAl8YSd5FoIQYp.N.2_xsQjQhzhM4Z1&retURL=https://c.na7.visual.force.com/apex/apexpage",true); xmlhttp.send(); } </script> well the above code returns error : Access Denied. I must tell you that I had already logged in using login.aspx page and it is working fine. but when i tried to call javascript function on the click event of button it throws error : Access Denied. Can any one help on this -Anil