5

I am getting the below error on a Visualforce page when clicking a button which triggers an actionFunction:

XMLHttpRequest cannot load https://cortexfull-auscript.cs89.force.com/portal/accountregister?refURL=http%3A%2F%2Fcortexfull-auscript.cs89.force.com%2Fportal%2Forder. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://cortexfull-auscript.cs89.force.com' is therefore not allowed access.

It seems quite weird to me because both origin and requested url are seem to be on the same domain: enter image description here

And the code for that is pretty simple as well.

$("#regDivId").live('click',function(){
    registerJun();
});

<apex:actionFunction name="registerJun" action="{!registerUser}" reRender="registerOpt,errorOPT" />

I don't think I need to post the controller side code because it is never reached. No debug log is generated when I click that button.

Any thoughts?

4

The origins are different; your request is to https, and the origin is http. Are you able to access the site through https?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.