Set Focus Back To Top Of Page.. - InfoPath Dev
in

InfoPath Dev

Set Focus Back To Top Of Page..

Last post 02-23-2011 11:31 PM by Patrick Halstead. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-17-2010 08:52 AM

    • Si_MHS
    • Not Ranked
    • Joined on 12-16-2009
    • Posts 7

    Set Focus Back To Top Of Page..

    Hello all,

    I am building a rather large info path form (10-12 pages) using a hidden value to determine which page is displayed.

    I am wondering if there is a way to switch focus back to the top of the page when clicking a button?

    Currently when clicking the 'Next' button I have put at the bottom of each section on the the form, the next section appears but the focus is still at the bottom of the page..

    Id rather not move the next/previous navigation to the top if I can avoid it.

    Any ideas?

    Thanks in advance

    Simon

  • 02-19-2010 09:36 AM In reply to

    Re: Set Focus Back To Top Of Page..

    You will need code for this. You can use the SelectText or SelectNodes methods.

    Outside that, consider placing a field at the top of the form and give it an accelerator key (like ALT+T) and have the users type that key sequence to return to the top.

  • 02-21-2010 01:22 PM In reply to

    Re: Set Focus Back To Top Of Page..

    Hi,

    unfortunately you can´t use "SelectText" or "SelectNodes" in a browser compatible form. The message that you will get is:

    'SelectText' is not a member of 'Microsoft.Office.InfoPath.View'

    As far as I know there´s no way to set the focus to a specific control in a browser-enabled form. I´m personally searching for a way of doing this for about two years now :-((...

    Regards,

    Karsten
  • 02-21-2010 10:27 PM In reply to

    Re: Set Focus Back To Top Of Page..

    i completely agree with Karsten, there seems to be no way of achieving this.

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-22-2011 02:01 PM In reply to

    Re: Set Focus Back To Top Of Page..

    Bump to see if anyone has ever figured a way to do this.

  • 02-23-2011 02:46 AM In reply to

    Re: Set Focus Back To Top Of Page..

    Interesting to see this again as I had to remind myself how I achieved this in the past just recently.

    As greg has posted, the only way I've also achieved this was to place a text box control at the top of the page and hide it by changing the fill & text colours to be the same as the existing content and remove any borders.

  • 02-23-2011 08:36 AM In reply to

    Re: Set Focus Back To Top Of Page..

    And then the user has to enter a key combination to focus on it? 

  • 02-23-2011 11:31 PM In reply to

    Re: Set Focus Back To Top Of Page..

    Personally, I'm a fan of not having more than a page on your form. Use hide-show techniques or tabs to break up your view into sections so that there's never a scrollable amount. Doesn't work in all cases obviously, but it's a good UI practice and certainly works around this issue.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.