What is the DATA field in the AJAX Post?

  • What is the DATA field used for?

    It isn't clear to me after reading the Construct Manual on it and most examples I see are from old versions and don't have that field.

    Is it to move the "?category1=data1&category2=data2" from the URL field to the DATA field? If so, is there any advantage to doing so? Or simply for organization?

    Bonus question: After a AJAX post is a return text/value stored in AJAX.LastData? Such as: echo 'success'. Separate question and testing it out now but thought anyone answering the first might know...two birds/ajax with one stone/post.


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I still haven't figured out the answer to the two above questions but have another issue that thought may be related:

    My AJAX post request is successfully submitting data to the mySQL table (I can pull up the table and see the entry added) but the events for the On tag error are firing instead of the On tag completed.

    How does Construct determine whether the POST was successful?

    I thought it was just doing this when previewing but I exported and uploaded to same server (as the table) and still having the error events firing.

    Thought this could have to do something with the Data field I'm leaving empty...

    I am still searching the forums and tutorials for a solution but most examples aren't detailed enough or are old and don't have the DATA field.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)