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

0 favourites
  • 1 posts
From the Asset Store
7 Errors
$15 USD
7 Errors is a game where you have to find the 7 mistakes before time runs out. Can you find all 7? Have fun looking.
  • 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.

  • Try Construct 3

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

    Try 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)