Me and another programmer are writing a web chat application. Previously he wrote the chat program for application only use, and private use due to some bugs that if found and released publicly, could destroy the system. The users apart of said system, were trust worthy enough that if they found the bugs, would not exploit them and bring his servers down. I begged him to write code that could implement into PHP, and told him i'd write the front-end for it.
However. I've run into an issue regarding jquery. Sure we can run the website pure html/css/php and have constant page reloading... OR, we can mix jquery into the equation and make this easier on users.
TL;DR: I'm writing a chat application with jquery, and this function that is meant to disable the chat functions if the chat loader denies them, doesn't work.
setInterval(function(){
$('#reload').load('/file.php?server=serverfur');
if($('#reload').html() == "Login to view server logs"){
if($(".login-button").prop('disabled')){
$(".login-button").prop('disabled', 'false');
$(".logout-button").prop("disabled", 'true');
}
}else{
if($(".login-button").prop('disabled')){
$(".login-button").prop('disabled', 'false');
$(".logout-button").prop("disabled", 'true');
}
}
}, 1000);