HTML
<body onload="JavaScript:timedRefresh(10000);">
<input type="checkbox" checked="checked" name="autoRefreshCheckboxes" >Auto Refresh</input>
</body>
JS
function timedRefresh(timeoutPeriod) {
if ($("input[name=autoRefreshCheckboxes]").is(":checked")) {
setTimeout("location.reload(true);", timeoutPeriod);
}
}
How can I make the checkbox work?
It seems that when the <body> loads, it takes the state of the checkbox, and ignores the state of the checkbox when the script is run.
thanks in advance!