Archive for October, 2008

Resetting a select menu onload

Tuesday, October 7th, 2008

The problem: when a user clicked the back button, the form stayed selected, but it shouldn’t have.

The solution:
body onload…

function resetForm() {
document.getElementById(”myselect”).value = document.getElementById(”myselect”).selectedIndex=0;
}