1 Reply Latest reply on May 10, 2012 1:38 AM by Liam Dilley

    move focus to anchor after web app form submit

    SmilingGoat

      Hi Guys,

       

      I have a webapp search form towards the bottom of the page and search results appear below the form.

       

      After the clicking the submit button, focus is returned to the top of the page.

      Could you provide advise on how to move the focus to where the search results appear.

      Due to a long piece of content the user does not see the results appear at the bottom of the page.

       

      This is the form action:

      <form name="catcustomcontentform90903" method="post" onsubmit="return checkWholeForm90903(this)" action="/Default.aspx?CCID=12627&amp;FID=79158&amp;ExcludeBoolFalse=True&amp;PageID={modu le_oid}">

       

      My guess is that I need to incorporate the achor into the action, but not sure how to edit this.

       

      Thanks

        • 1. Re: move focus to anchor after web app form submit
          Liam Dilley Adobe Community Professional & MVP

          Shifting and scolling the browser in that way to show results is not a good idea.

          It is why for a long time people complained in the old BC UI for the admin when you saved it would scroll the screen up to read the message. This is very annoying and solves the problem in front of you but not the root issue.

           

          Depending on the results, you should have a modal window approach or design to try and avoid the need to have to shift the viewport for the user. Use of Ajax of course is comon place to also view things like this as well.