Ajax Questions

Discussion and feedback on Construct 2

Post » Tue Oct 25, 2011 7:57 pm

I am looking through the Ajax plugin, and I have random general questions in regards to it, and possibly, a additional options for it.

- why is it using the 'GET' method only?
- what if I want to pass variables and values (I assume this has to be set in the URL string?)
- is it only limited to the same domain? And/Or is mobile a bit more loose on this?
- JSON? Can I get my data back in JSON format please?

Posts: 18
Reputation: 609

Post » Tue Oct 25, 2011 8:07 pm

You can check this tutorial about AJAX and this related topic.

The limitation to the domain comes from a security limitation from javascript itself.
Anyway, mobile or desktop, as long as you're hosting your application on some domain and making AJAX's request to this domain, it should work.

To get back datas in JSON, you have to set your server-side script to return in JSON.

For the 'GET' question, I agree I'd like 'POST' requests too. They might be added in a future release.

Be sure to check the How do I FAQ to check more topics about AJAX and other subjects.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Posts: 7,289
Reputation: 83,098

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest