Ajax request with dynamic url

Get help using Construct 2

Post » Wed May 21, 2014 2:06 pm

Hello,

I'm trying to make an Ajax request with a dynamic url, depending of the button clicked. Each button got a variable called requestJson, so when I click the button I called :
Ajax -> Request : Button.requestJson

AjaxRequest.png


But the ajax request url is empty and I get nothing back, where am I wrong ?

If I debug the buttons variable they are filled with URLs. Spend the last 2 hours on this stupid thing !

Thanks ! :)
You do not have the required permissions to view the files attached to this post.
B
40
S
15
G
5
Posts: 295
Reputation: 6,129

Post » Thu May 22, 2014 10:51 am

Should I post this to the bug section ?
B
40
S
15
G
5
Posts: 295
Reputation: 6,129

Post » Thu May 22, 2014 11:18 am

not sure, as no one can see, what URL you try to call... it could be something simple as a missing " or some misformat.
If you could upload a sample capx, of what you are trying would help us to see what you might have done wrong.

The possibilities are huge:
- wrong formated URL
- wrong format of the requested data
- ...
B
44
S
10
G
8
Posts: 437
Reputation: 6,473

Post » Thu May 22, 2014 12:55 pm

No, everything is fine in the url, if I set up the url not coming from the button variable everything work.
B
40
S
15
G
5
Posts: 295
Reputation: 6,129

Post » Thu May 22, 2014 3:08 pm

still no clue as important information are missing, but maybe you have the same problem as here:
how-do-i-fix-this-ajax-request_t105751
B
44
S
10
G
8
Posts: 437
Reputation: 6,473


Return to How do I....?

Who is online

Users browsing this forum: ounound and 19 guests