Welcome Guest, Not a member yet? Register   Sign In
Ajax: Permission denied to call method XMLHttpRequest.open
#1

[eluser]TSOL[/eluser]
Hi,

I'm trying to implement an ad rotator logic that logs users' info by making an AJAX POST every time the ad displays to a function within a Controller. Within the Controller, it inserts an entry into a table. Simple, right?

I'm getting the "Error: uncaught exception: Permission denied to call method XMLHttpRequest.open" once in awhile.

I googled the error and it's due to cross domain calls. The Controller is within the same down right? Also, the error is not consistent (exception doesn't occur every time).

Any input / advice is appreciated.

Cheers.
#2

[eluser]ejangi[/eluser]
Just an idea: Try leaving off the base_url() so that the AJAX POST is just to something like "/controller/method/id" and see if that helps at all...
#3

[eluser]TSOL[/eluser]
That seemed to do the trick. Thanks James!




Theme © iAndrew 2016 - Forum software by © MyBB