Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Form scrolling

  1. #1
    New Coder
    Join Date
    Jul 2003
    Location
    Houston, Texas
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form scrolling

    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">
    <tr>
    <td class="col_class" colspan="3"><u>Which of the following applies to your facility?</u></td>
    </tr>

    <tr>
    <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
    Beyond a critical point within a finite space, freedom diminishes as numbers increase. ...The human question is not how many can possibly survive within the system, but what kind of existence is possible for those who do survive."

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,965
    Thanks
    0
    Thanked 236 Times in 233 Posts
    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);"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •