I have been having the following problem, i think it\'s probably due to the fact that my approach may be misguided, but hopefully with your help i can sort this out!
It's also possible if you're currently on a http webpage and are trying to send an AJAX call to a https website on the same domain.
http
https