views:

19

answers:

1

Hello all,

I am trying to make use of a script that uses CPAINT and I keep getting the error above when I click on favourite an item (a 5 star rating system).

It looks like it is making an AJAX request but I can not see this from my Firebug to debug this - why is this the case?

More importantly what does the error code 0 mean?

Thank you all for any help

+2  A: 

A response code of 0 from XMLHttpRequest can mean that you are being blocked by the same origin policy. Make sure that you are using relative URLs for your AJAX requests.

You may also want to check out the following Stack Overflow post for one possible solution to workaround the same origin policy:

Daniel Vassallo
@Daniel - that mention of the same origin policy prompted me to check the URLs and wouldn't you belive it, all other AJAX requests were using the correct URL. But this one was missing a `/` before the script name. Oh dear! Thanks! :)
Abs
@Abs: Glad it works now... However that is quite strange, as I would expect that to return a normal response code with a 404 Not Found status code. However I don't know how CPAINT works, so it might be returning different code values from the XMLHttpRequest.
Daniel Vassallo