Dayo Posted March 26, 2021 Posted March 26, 2021 A while back i started work on making GLs pages load via AJAX, using the default theme you can enable this by editing the,es/default/loggedin.php and changing <!--<script src="themes/{_theme}/js/ajax.js"></script>--> to <script src="themes/{_theme}/js/ajax.js"></script> This script will turn all A tags into AJAX links as well as FORM tags. It would be great if people can test and post any bugs they find here. I would advise agains testing this on a live running game. 1 Quote
Glock1533 Posted March 26, 2021 Posted March 26, 2021 (edited) I activated it in my game, on my phone when I open the menu it does not close, I have to close it manually yes I see the new page edit2: the prison and hospital page doesn't load for me, it only loads if I refresh the page Edited March 26, 2021 by Glock1533 1 Quote
Sim Posted March 26, 2021 Posted March 26, 2021 [QUOTE] This script will turn all A tags into AJAX links as well as FORM tags. [/QUOTE] Is there a way to disable certain links Ex: link.php?noAjax=true ? Or by adding extra data to the <a herf 1 Quote
Dayo Posted March 26, 2021 Author Posted March 26, 2021 yes you would do it like this <a href="?page=test" data-not-ajax>Test</a> <form method="?page=test" action="POST" data-not-ajax> ... </form> 1 1 Quote
Sim Posted March 26, 2021 Posted March 26, 2021 3 hours ago, Dayo said: yes you would do it like this <a href="?page=test" data-not-ajax>Test</a> <form method="?page=test" action="POST" data-not-ajax> ... </form> <a href="?page=test" data-not-ajax>Test</a> <form method="?page=test" action="POST" data-not-ajax> ... </form> Thanks. This is definitely needed information. 🙂 Quote
Dayo Posted March 26, 2021 Author Posted March 26, 2021 Yeah i will better document it later and also finish off the default template as i still need to do something for the timers not sure how yet tho Quote
CrazyElk Posted March 27, 2021 Posted March 27, 2021 (edited) 16 hours ago, Dayo said: A while back i started work on making GLs pages load via AJAX, using the default theme you can enable this by editing the,es/default/loggedin.php and changing <!--<script src="themes/{_theme}/js/ajax.js"></script>--> to <script src="themes/{_theme}/js/ajax.js"></script> <!--<script src="themes/{_theme}/js/ajax.js"></script>--> to <script src="themes/{_theme}/js/ajax.js"></script> This script will turn all A tags into AJAX links as well as FORM tags. It would be great if people can test and post any bugs they find here. I would advise agains testing this on a live running game. @Dayo ... those two lines are identical, typo?? Ok, all good ... your suggesting that line be uncommented, cheers. 🙂 Edited March 27, 2021 by CrazyElk 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.