Friday, March 26, 2010

Re-Open Javascript works in DW Live...

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,

%26lt;body onLoad=''setFocus()''

Up in the %26lt;head%26gt; 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?

Re-Open Javascript works in DW Live...

Please do NOT start a new thread for the same problem. It results in answers being posted in different places, leading to confusion, and wasting everyone's time, including your own.

I have locked the original thread to prevent further answers being posted there, as you seem to have changed your code. I don't have time to look at your problem at the moment, but will come back to it later if no one else has solved it for you in the meantime.

Re-Open Javascript works in DW Live...

Sorry.?In reality, while conceptually similar, this is a somewhat different problem.?This page/form simply does not behave the same as several others with the same/similar code, whether it be calling another form, displaying a readonly field or moving focus.?This could drive me sane.?I actually have two threads for different problems with the same page, and they're building with each attempt I make to correct them.?Your assistance would certainly be appreciated.

Thanks again.

No comments:

Post a Comment