Skip to content

Instantly share code, notes, and snippets.

@carlosleonam
Last active April 20, 2024 01:39
Show Gist options
  • Save carlosleonam/5b0a447b8334aeab76b5aeade8f03de5 to your computer and use it in GitHub Desktop.
Save carlosleonam/5b0a447b8334aeab76b5aeade8f03de5 to your computer and use it in GitHub Desktop.
Snippet to refresh some Dashborad with Adianti Framework ( by Claonilton Junior )
<?php
$script = new TElement('script');
$script->type = 'text/javascript';
$script->add("
$(document).ready(function(){
window.setTimeout(function(){
var results = new RegExp('[\\?&]class=([^&#]*)').exec(window.location.href);
if('".__CLASS__."' == results[1] )
__adianti_load_page('index.php?class=DashboardEmpresa&method=onReload');
}, 5000);
});
");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment