I need help linking from one playground code to the output of the other. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

I need help linking from one playground code to the output of the other.

I received help from the earlier question I posted, and I am now able to create a working link between two playground codes. The problem now is the link is to the coding section of the second playground. I would like to link directly to the output section. Any ideas? I basically want to be able to click on a picture in playground 1 and then see a picture in playground 2. Click on that picture and go back to playground 1.

30th May 2018, 8:12 PM
Ryan Els
Ryan Els - avatar
12 Answers
+ 5
Thanks for the feedback guys 👍
31st May 2018, 3:38 AM
Ryan Els
Ryan Els - avatar
+ 4
I'm no Code Playground guru, but that's not possible. It's being compiled on the server and the output is returned to your client (browser). As such, you've no means of accessing their server to obtain the output data from it. If you're at a point that you're wanting to practice more advanced concepts, then I dont recommend that you use the Code Playground. Use an IDE on your local machine or server and you'll have the full range of access you require to execute whatever code you create.
30th May 2018, 8:28 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 4
Thank you all for the responses. Thanks Krow. You a star 👍. That will work perfectly.
31st May 2018, 12:12 PM
Ryan Els
Ryan Els - avatar
+ 3
Then maybe you can help me to make another "page" within the web page so the content is hidden until the user clicks on the image? Any ideas there?
31st May 2018, 3:43 AM
Ryan Els
Ryan Els - avatar
+ 3
31st May 2018, 7:20 AM
KrOW
KrOW - avatar
+ 2
Fata1 Err0r as far as i know the web stuff is just executed on the local device, not compiled on the server since it doesn‘t need to be compiled. but i still think it‘s impossible
30th May 2018, 9:20 PM
Max
Max - avatar
+ 2
@Max It's still being contained and controlled by SoloLearn's compiler then fed back to you via the output in Code Playground. I get your logic on it though.
30th May 2018, 10:55 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
Fata1 Err0r but they only need to controll it if the code is run from pc, if its run from mobile the native web ui container should normaly prevent security problems automatically
31st May 2018, 7:41 AM
Max
Max - avatar
+ 2
@Max Security purposes or not, it's still contained by them and controlled by their server. However, I can't attest to the mobile end of it, because I'm a PC user and haven't read the mobile app's code, so I'll take you on your word with that end of it. On the web version of SoloLearn, everything is definitely sent over to their compiler and fed back though. @Ryan Check out the link that Krow posted. I think that's along the lines of what you're asking for.
31st May 2018, 12:05 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 2
Cool thanks. Will give it a try 👍
31st May 2018, 2:20 PM
Ryan Els
Ryan Els - avatar
+ 1
Ryan Els I dont understand what are you want do... I think that your tell in web code context then you want make an web page with an image and clicking in latter you want what? Replace content of current code output with another? Open another code in new window?
30th May 2018, 9:23 PM
KrOW
KrOW - avatar
+ 1
Ryan Els You are welcome 👍👍👍 and thanks 😊... Anyway my code its an example that you have to adapt to your need... In practice you must get a list of reference of your "pages" (contained in a div). When do you want show one of they, set display css attr to "block" to target "page" container and to "none" to others containers Fata1 Err0r App and web version have different way to make the web page... Web version has in container page the data (css, html and js content) stored in vars and generate dom in a frame (code output). App version get from server the code and insert all in a blank page in the webview. In theory this allow to parse dom from an SL web code url to get contained code but for @Ryan Els purposes its nit necessary (and break SL rules)
31st May 2018, 12:24 PM
KrOW
KrOW - avatar