Making Validation Summary visible

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • daveh551

    Making Validation Summary visible

    I have a web page with an address entry form and some other things on
    it. The form has field validators on several of the fields, and a
    validation summary at the bottom. Because of the size of the form, on
    a typical screen, you need to scroll to see the bottom of the form,
    which is where the validation summary is. So when a user presses
    submit, and gets a validation error, the screen redisplays, but it
    redisplays from the top with (typically) the error messages below the
    bottom, and the naive user is going to say "What the heck, why did it
    bring me back here again".

    I've tried unsuccessfully to have it redisplay with the screen
    scrolled up so the bottom portion is in view. I'm sure this can be
    done, probably relatively easily. Can someone give me some pointers on
    how (aside from moving the validation summary to the top of the
    screen!).

    Thanks.
  • Gregory A. Beamer \(Cowboy\) - MVP

    #2
    Re: Making Validation Summary visible

    The position of the form in the browser is partially dictated by you and
    partially by the user. I do not have the specifics, but newer browsers allow
    a particular position to be saved (where a user has scrolled). This may or
    may not be useful. If so, it is a simple setting. I don't have it in front
    of me right now and don't remember what it is called. It is a setting in the
    browser that you can tell the browser to use from your code. I am also not
    sure it will work.

    One option is to set up an anchor tag where the validation summary will go
    and use JavaScript to scroll to that anchor. A bit more work to "debug" as
    you have client and server side to contend with, but it will work.

    I would seriously conside the validation summary at the top or move away
    from summary and use CSS to change colors of the elements that are
    incorrect, with proper tags to create hovers for the mistakes. I think it
    makes a much prettier design. if you opt this direction, you can still have
    summary at the bottom, but it is not really necessary, as the user can see
    everything that is wrong as he goes through the form.

    NOTE: The above pattern is a bit of work, unless you create your own custom
    validation object to work from.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog


    or just read it:


    *************** *************** **************
    | Think outside the box! |
    *************** *************** **************
    "daveh551" <geekdh@gmail.c omwrote in message
    news:a6e38310-9c53-471f-896c-b3146c1caac7@v3 9g2000pro.googl egroups.com...
    >I have a web page with an address entry form and some other things on
    it. The form has field validators on several of the fields, and a
    validation summary at the bottom. Because of the size of the form, on
    a typical screen, you need to scroll to see the bottom of the form,
    which is where the validation summary is. So when a user presses
    submit, and gets a validation error, the screen redisplays, but it
    redisplays from the top with (typically) the error messages below the
    bottom, and the naive user is going to say "What the heck, why did it
    bring me back here again".
    >
    I've tried unsuccessfully to have it redisplay with the screen
    scrolled up so the bottom portion is in view. I'm sure this can be
    done, probably relatively easily. Can someone give me some pointers on
    how (aside from moving the validation summary to the top of the
    screen!).
    >
    Thanks.

    Comment

    Working...