How do I ajax php

Get help using Construct 2

Post » Sat Apr 25, 2015 1:06 am

Hi,
I have a php file in my server with this code>

echo 100;

in construct2 i have this code:

on start of layout - ajax-request"mywebpage.com/myphpfile.php" (tag "test")
on "test" completed - textbox-set text to Ajax.lastdata

the result: nan

and if i do
on "test" completed - textbox-set text to int(Ajax.lastdata)

the result: 0

what am i doing wrong?

thanks!
B
8
S
1
Posts: 34
Reputation: 434

Post » Sat Apr 25, 2015 2:22 am

Are you able to post your php script? NaN is "Not a Number", but with these steps it doesn't look likely unless than is what the php is echoing


Oops, it is echo 100;. Maybe will need to see the capx
B
32
S
6
G
2
Posts: 317
Reputation: 2,801


Return to How do I....?

Who is online

Users browsing this forum: odiusfly and 27 guests