G'day everyone
My page can't be refeashed or the person on it will be kicked out of a voice chat session.
Also trying to do this without going server side.
I'm looking for a way so that about ever 5 mins the users has the page open a timer counts down to zero and then run's a php script in the background that will refresh thier status as being logged on in a mysql db.
knowing full well a php page can't be be run without a refresh I think the only way is to use javascript to get the countdown clock to count down.
I have the countdown clock working fine.
The logon script is working just fine so when they first come to the page they are flaged as being logged on in the db.
the database is setup in a way so anyone that is no longer there in 5 mins the record is deleted this is handled when anyone comes into the site all old records are dropped.<this allows for droped users or those that don't logout correctly
So knowing I'm still learning I'm looking for a way to run a php script from js without having to open a tiny window.
I have tryed using the following statements
JS function;
function callScript(){
grabImage = new Image(0,0); grabImage.src="/system/logit.php"; void(0);
}
which does seem to work fine the first time the script is run. I have this is alittle function with my js and I can call it when it's in the main flow of the program. but once I try adding it to my clock script it fails to function. nor can I call it from an onclick of a button.
Also no errors are genrated even if I remove the void(0);
run by itself in the main flow it runs the script just fine and updated the database but can't get it to work from being called by anything else. :-(
Any ideas?
DaveR