What is the DATA field in the AJAX Post?

Get help using Construct 2

Post » Sun Jun 19, 2016 12:51 pm

What is the DATA field used for?

Image

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.

Thanks
ImageImageImage
B
44
S
26
G
11
Posts: 520
Reputation: 10,506

Post » Sun Jun 19, 2016 5:08 pm

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.
ImageImageImage
B
44
S
26
G
11
Posts: 520
Reputation: 10,506


Return to How do I....?

Who is online

Users browsing this forum: max2612 and 27 guests