0 Favourites

How do I check AJAX error on c2? (more easily?)

  • Posting this since I spend 3 hours on this silliness and thought I'd help someone else if it ever comes up again.

    #1 Have .php file, works fine in browsers.

    #2 Have AJAX on send...tag, data, post...updates the database.

    ***Everything works and yet...still triggers Error*** (error in construct and not triggering next events*)

    Could find nothing on C2 forums that helped figure it out...(didn't know what the problem was, so hard to find a solution)

    Finally I went to the browser developer tools to see if anything was there.

    On Mozilla: Developer, Console

    Scrolled down to see:

    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://www.***etc., etc.com?call=1234 (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

    After 5 minutes...the "L"s in Allow were "1"s... (no clue how that happened on a copy/paste), hope this might help others to self identify AJAX issues.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)