That sounds like a domain name issue. Normally you'll see this if you have your full url set to domain.com but you are visiting by
www.domain.com, or vice versa. There are some security precautions with AJAX in that it will only allow you to use it on the exact domain you're currently on.
Hopefully that makes a bit of sense.