Experimental ajax in SL PHP | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Experimental ajax in SL PHP

hey, i will testing ajax on SL. i think that is possible with the php editor. it is possible to refer to the own page in the code? I tried the complete url and the file name. but it doesnt work :/ thank you! https://code.sololearn.com/wGD1TB3e1Dar/?ref=app

31st Oct 2018, 8:07 PM
Stefan Es
Stefan Es - avatar
3 Answers
+ 1
As far as I know, you can't. When you refer the the page of your code, you're referring to sololearn's PHP file. Your code is in a frame inside that php, this means it's sealed, you can't access it from outside the frame.
31st Oct 2018, 8:11 PM
voidneo
+ 1
The file where you do the Ajax request MUST be in the same domain than the PHP that handles it. Meaning, you can't access your server from sololearn. at least not that easily
31st Oct 2018, 8:18 PM
voidneo
0
ah okay.. thank you, maybe i try to load the file on my own server and refer it..
31st Oct 2018, 8:16 PM
Stefan Es
Stefan Es - avatar