Welcome to Axure Community Site Sign in | Join | Help
in Search

Geting focus on page load

Last post 10-16-2008, 4:47 AM by hu_zhenghui. 2 replies.
Sort Posts: Previous Next
  •  10-13-2008, 6:05 PM 3480

    Geting focus on page load

    Is there a way to automatically place the focus in a specific field when the page opens?
  •  10-13-2008, 6:25 PM 3481 in reply to 3480

    Re: Geting focus on page load

    Unfortunately, this is not available in the current version. We plan to add this ability to a release early next year. On the OnPageLoad event, you will be able to add an action to set the focus on a field.
  •  10-16-2008, 4:47 AM 3498 in reply to 3480

    Re: Geting focus on page load

    edcooper:
    Is there a way to automatically place the focus in a specific field when the page opens?

    How to implement the "set focus" action

    Axure RP Pro has supported onFocus and onLostFocus event, but Axure RP Pro has not supported the "set focus" action. The code below show an alternate method to implement the "set focus" action:
    var customization_found = true;
    $(function () {
            var currentPageName;
            window.setInterval(function () {
                    if (currentPageName !== mainFrame.PageName) {
                            switch (mainFrame.PageName) {
                                    case 'Home':
                                            $(mainFrame.document).find('[@title="textField"]').focus();
                                            break;
                            }
                            currentPageName = mainFrame.PageName;
                    }
            }, 100);
    }); 

    Skype : huzhenghui
    Gtalk : huzhengh
    Gmail : huzhengh@gmail.com
View as RSS news feed in XML