How do I read a parameter in URL that call my game ?

Get help using Construct 2

Post » Wed Jun 03, 2015 1:12 am

Hello.

Please, I need to read a parameter in my URL game :

-when a call the game (index.html) whit this parameter in URL (Moodle ambient) I need to read this parameter (?user01=test03) in Game.

AJAX request "http://127.0.0.1/$user01" (tag"abc") ?????? don´t work!!!

Any Idea?

Thanks.
B
5
Posts: 3
Reputation: 231

Post » Wed Jun 03, 2015 7:31 am

You can get url information through the browser object.

Manual entry on the browser object
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jun 04, 2015 11:57 pm

Thanks a lot.

Browser Object

QueryParam
Return a query string parameter by name. For example, if the URL ends with index.html?foo=bar&baz=wan, QueryParam("foo") returns bar and QueryParam("baz") returns wan.

100% OK.
B
5
Posts: 3
Reputation: 231


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish and 14 guests