How do I post data using AJAX?

Get help using Construct 2

Post » Tue May 14, 2013 4:18 pm

The html file is on www.myserver.com/Uploader01 and the php file is in www.myserver.com/UploadTest.

Can't see why there would be a security issue. DO they need to be in the same folder too?Grimmy2013-05-14 16:19:09
B
6
Posts: 10
Reputation: 422

Post » Tue May 14, 2013 4:26 pm

Nope they only have to be at the same domain.

In my current project all AJAX Requests work fine and i'm sorry but i can't figure out where your problem could be. We already checked the most relevant parts.

B
7
S
1
G
1
Posts: 32
Reputation: 1,016

Post » Tue May 14, 2013 4:32 pm

okay thanks. I'll keep looking and post here when I figure it out.
Thanks for your help!
B
6
Posts: 10
Reputation: 422

Post » Tue May 14, 2013 4:40 pm

Do you use Firefox with an Addon like "Request Policy" or some crazy restrictive firewall-rules ?

Capx ... checked
PHP Script ...checked
Server config and permission ... checked

So the last thing we have not checked is your Browser / System ^^

Good luck finding the error
B
7
S
1
G
1
Posts: 32
Reputation: 1,016

Post » Tue May 14, 2013 4:52 pm

Hmm, I'm using Chrome & no weird extensions. :)

For some reason even the php file has stopped working although I haven't changed it.

Does it matter that I am using the free trial version?
B
6
Posts: 10
Reputation: 422

Post » Tue May 14, 2013 5:00 pm

Your C2 Version doesn't matter.

PHP stopped ... hm ^^ You should try to upload all stuff to a different server.

You have done everything right and it should work.
B
7
S
1
G
1
Posts: 32
Reputation: 1,016

Post » Tue May 14, 2013 5:05 pm

FIXED!

The reason PHP stopped was because I was messing with folder (not file) permissions and infact this WAS the root cause of the initial problem.

For some reason, once I messed with the folder permissions the AJAX calls now work from inside the html page.

Got there in the end. Hopefully this will help someone in the future too.

Thanks again!
B
6
Posts: 10
Reputation: 422

Post » Tue May 14, 2013 5:07 pm

Mission accomplished.
B
7
S
1
G
1
Posts: 32
Reputation: 1,016

Post » Wed May 15, 2013 9:45 am

I followed this thread and it didn't work to me, sometimes it gave me errors like 500 and [an error occurred while processing this directive]

Would you help me step by step?
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Wed May 15, 2013 12:43 pm

Where do you capture this error messages?
B
7
S
1
G
1
Posts: 32
Reputation: 1,016

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 20 guests