Re-Open Javascript works in DW Live View, but not on server
The Javascript in the first form works correctly both in DW Live View AND on the server. It DOES NOT work correctly in the second form which uses pretty much the same code, just more of it. In the second form, as in the first, I have,
<body onLoad="setFocus()"
Up in the <head> is the function:
function setFocus()
{
document.getElementById("RadioGroup1_1").focus();
}
This does'nt work in the browser/server. In Live View, the "Yes" radio button (i.e. "RadioGroup1_1") is highlighted, but NOT in the browser/server. The wierd part is that if I click the radio buttons, AND THEN press the Tab key, focus moves to where it's supposed to (and the button has a dotted border), but that location IS NOT HIGHLIGHTED. Then, whichever button (i.e. Yes or No) gets the dotted border, but than I have to press the Tab key to make the focus move to the next appropriate radio button. Since each "next location" is dependent on the Yes/No response in the previous one, the highlighting and automatic movement is necessary for the end-user to properly fill out the form.
In each of the radio button groups I have an "onChange="someFunction()", and that pattern is followed BUT ONLY after pressing the Tab key, and NOT when I actually click the radio button to change its value.
Is there something extra that I have to do to make the form behave in the browser/server the way it does in Live View? If not, can anyone tell me what I'm missing?
