Auo Refresh is contradicting Colorizing Row
I am young webdesigner who is learning HTML and CSS at the moment. I have not yet learned Java but will be taking a course soon. I just cannot seem to figure this simple task out.
I have a page where I want to refresh every 10 seconds. The code is below(CODE1) that I found on this forum. It is saved as a .JS file. Works perfectly. It however is contradicting with another piece of code that colorizes rows. That code is saved on the footer.php HOOKS file. I know i am suppose to merge these two codes together and I have tried but won't run the way its suppose to. . Anyone want to have a crack at it?
Secondly, When I click on the ADD NEW button to input new data, the page would load the entire table after 10 seconds.
Thanks Guys!!
CODE1
=========================================
$j(function(){
setInterval(function(){
$j('table').parent().load('tablename_view.php?SortField=5&SortDirection=desc table', function(){
// do something after reloading the table view
});
}, 10000);
})
=====================================================
Code2
--------------------------------------------------------------------------
<script>
$j(function(){
$j('.Trouble_Call_Log-Status').each(function(){
var Status = $j(this).text();
if (Status == 'WIP'){
$j(this).parents('tr').addClass('warning');
}
if (Status == 'BRKDWN'){
$j(this).parents('tr').addClass('danger');
}
if (Status == 'WOP'){
$j(this).parents('tr').addClass('info');
}
})
})
</script>
------------------------------------------------------------------
Auo Refresh is contradicting Colorizing Row
Re: Auo Refresh is contradicting Colorizing Row
Hi,
maybe you can explain why you would need to reload the page every 10 sec, as if somebody wants to enter some data, if he is not quick enough he will have to redo everything.
maybe you can explain why you would need to reload the page every 10 sec, as if somebody wants to enter some data, if he is not quick enough he will have to redo everything.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Auo Refresh is contradicting Colorizing Row
I am using it as a display. This way employees can see it on a monitor and know what problems arises.
Re: Auo Refresh is contradicting Colorizing Row
Hi,
in this case I would suggest that you create a view for the table for which you can update the page every 10 sec.
See https://forums.appgini.com/phpbb/viewto ... f=7&t=2980 (sjohn explained how to do that).
in this case I would suggest that you create a view for the table for which you can update the page every 10 sec.
See https://forums.appgini.com/phpbb/viewto ... f=7&t=2980 (sjohn explained how to do that).
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.