Get Parent Page QueryString

Get help using Construct 2

Post » Thu Mar 09, 2017 10:42 am

Hi,
Browser.QueryParam or Browser.QueryString is not available if game is embedded inside a web page. Can anyone please help.
If Browser.Domain is used it returns the embedded game path, not the parent page web address.

Eg: if my parent page is index.html?Name=Jhon&Age=29, and game is in an iframe with address game/mygame.html i want to get Name and Age from parent page.


Thanks
Last edited by shaurya on Fri Mar 10, 2017 7:27 am, edited 1 time in total.
B
7
S
3
Posts: 7
Reputation: 591

Post » Thu Mar 09, 2017 4:16 pm

shaurya wrote:Hi,
Browser.QueryParam or Browser.QueryString is not available if game is embedded inside a web page. Can anyone please help.
If Browser.Domain is used it returns the embedded game path, not the parent page web address.

Eg: if my parent page is index.html?Name=Jhon&Age=29, and game is in an iframe with address game/mygame.html i want to get Name and Age from parent page.


Thanks


If you run in an I Frame I think it has to address files stored on that website. Are you storing that data on the same website where the I frame is used?
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Fri Mar 10, 2017 4:20 am

when the iframe request my website for game, I use httphandler and fetch the game from external source and send the game as response to iframe. For the client it looks as if the game is hosted in my site.

But anyway I need the parent page QueryString data in my construct2 game thats inside an iFrame. But Browser.QueryString is returning me IFrame Src data.


Thanks
B
7
S
3
Posts: 7
Reputation: 591


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests