Running javascript in browser to return JSON for array

Get help using Construct 2

Post » Fri Jun 06, 2014 9:49 am

Trying to set up a way to get a Javascript function I add to the page where my construct2 game is to run and return a JSON string which can be used by Construct2 to create an array.

I have a JSON string built. and I define that array in javascript and I am able to return the JSON using the console and asking for it using something like "window.myJSON();"

I have been trying to get this JSON into construct2 using:
ArrayJSON | Load from JSON string BROWSER.ExecJS("window.myJSON();")

But no luck. Need help with what to do so I can get this JSON from the browser. Any ideas?

Currently; I export the HTML5 code and then using Notepad++ add the <Script ... into the header of the index.html page and run the game on my server.
Posts: 2
Reputation: 179

Post » Sat Jun 07, 2014 7:08 am

JSON from the browser=Browser.QueryParam
Posts: 360
Reputation: 2,202

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests