Why is "return" used in the onclick even handler below, seems to function with or without the return specification in the onclick event for the buttons?
input type="radio" name="radCPUSpeed" value="6 Ghz"
onclick="return radCPUSpeed_onclick(2)"
The function does not seem to do anything with it, why do you need return in the input declaration above?
function radCPUSpeed_onclick(radIndex)
{
var returnValue = true;
if (radIndex == 1)
{
returnValue = false;
alert("Sorry that processor speed is currently unavailable");
// Next line works around a bug in IE that doesn't cancel the
// Default action properly
document.form1.radCPUSpeed[radCpuSpeedIndex].checked = true;
}
else
{
radCpuSpeedIndex = radIndex;
}
return returnValue;
}