Jump to content
MakeWebGames

AJAX Page Loading


Dayo

Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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 by Glock1533
  • Like 1
Link to comment
Share on other sites

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. 🙂

Link to comment
Share on other sites

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 by CrazyElk
  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...