Yeah, I said cookies....
But beyond, the code that you have in both what you posted, and the site in the link..... when you click the radio button, it executes an onclick event.... right? That function is called "check", and it gets called when you click an option button. The check box's don't call any kind of function at all, but the option buttons do. Why the checkbox's retain their value, and the option buttons do not, is beyond me.... but I'll bet if you call the check function within the refresh_window function, it should work just fine.... Look carefully at this line:
<input type="radio" name="chartType" id="chartType" value="column" onclick="check(this.value)" > column
onclick, it calls check(this.value), when you hit refresh, the first time, it works if you change the option button, because you clicked the option button, and it called this function... when you click it the second time, it never calls "check".... ever. Not once... it needs to. So, somewhere in the refresh_window function, you need to have it call the check function.
function refresh_window()
{
var type = document.getElementById("chartType").value
check(type);
window.location=("radio2.php?type=" + type)
}
Or something along those lines...