...

View Full Version : chat script refresh rate



2n193r
05-25-2005, 07:58 AM
ther is a frame called messages:i placed refrsher(0) in the onload and at the end of the content. why does this keep refreshign the page like every .5 seconds
the vales for the pulldown are like 1000 ect and stop

function refrsher(time) {
rateChoser = parent.status.document.forms['refresher'].elements['time'].value;
if(rateChoser == 'stop' || rateChoser > time) {
refrsher(time+500);
}
else {
window.location.reload(true);
}
}

rlemon
05-25-2005, 05:41 PM
var refreshRate = 5; // in seconds.
function refresh(frame){
var myFrame = document.getElementById(frame);
myFrame.src=myFrame.src;
setTimeout("refresh(frame)", (refreshRate*1000));
}

2n193r
05-25-2005, 09:59 PM
this is the code im using now and it works.
function refrsher(time) {
rateChoser = parent.status.document.timeSelecterForm.SelectTime.value;
if(rateChoser == 'stop' || rateChoser > time) {
setTimeout("refrsher(" + (time+500) + ")", 500);
}
else {
window.location.reload(true);
}
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum