Ajax Request help

Get help using Construct 2

Post » Sat Feb 15, 2014 9:02 pm

Hi Guys,

I ve been working on a custom highscore, but i encounter a strange problem when requesting with ajax.

i have a global variable score in my project, and a inputbox to store the name so, that will be:

AJAX Request:

[code]"http://mydomain.com/stuff/scores.php?name="&inputbox.text&"score="&score[/code]

It doesn't worky and i have no idea why?



If i use no variable, and put directly values, like this:

[code] "http://mydomain.com/stuff/scores.php?name=somename&score=777"[/code]

It works.

Any help would be appreciated. Thanks
Image
B
30
S
5
G
1
Posts: 125
Reputation: 3,220

Post » Sat Feb 15, 2014 9:25 pm

output in first situation:
http://mydomain.com/stuff/scores.php?name=namescore=score

output in second situation:
http://mydomain.com/stuff/scores.php?name=name&score=score

See the difference?Stiivais2014-02-15 21:29:40
B
10
S
1
Posts: 163
Reputation: 1,436

Post » Sat Feb 15, 2014 9:35 pm

So you say?

"http://mydomain.com/stuff/scores.php?name="&inputbox.text&"&score="&score

that doesnt work.
Image
B
30
S
5
G
1
Posts: 125
Reputation: 3,220

Post » Sat Feb 15, 2014 9:48 pm

Actually it works, strange i tried it 2 times, but i probably messed something in the process, i was wondering wth, it makes no sense:p

I need some sleep:P

Thanks
Image
B
30
S
5
G
1
Posts: 125
Reputation: 3,220


Return to How do I....?

Who is online

Users browsing this forum: David181, Lordshiva1948, NN81, Yahoo [Bot] and 12 guests