View Full Version : Form scrolling

12-18-2003, 12:33 AM
Ok, here is what is happening. I have a form with about 10 sections on it made up almost exclusively of radion buttons and check boxes. When I put the focus on the first element in a new section, I call a script to scroll the form so the the title of the new section is at the top of the page. However, even though I have checked the button or box in the new section, the form scrolls forward but the radio button or check box is not checked. I have to check it twice in order for it to be checked. This is getting frustrating for my users. Is there any way that this problem can be resolved. Here is some code I am using:

<table width="100%" bgcolor="#336699" border="3" cellspacing="2" bordercolor="#eeeeff" rules="groups"
bordercolorlight="#eeeeff" bordercolordark="#eeeeff">
<td class="col_class" colspan="3"><u>Which of the following applies to your facility?</u></td>

<td class="td_class" width="33%"><input type="radio" name="single_multi" value="S" onfocus="return moveWin(0,400); highlight(event)" id="000090">Single-story</td>

Thank you

12-18-2003, 06:25 AM
Do you have return false in moveWin()? Change it to return true so that the onfocus event won't be cancelled. And take note that the highlight() function will never be called because of the return keyword.

onfocus="return moveWin(0,400); highlight(event)"

Maybe you want it like this:

onfocus="highlight(event); return moveWin(0,400);"