Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8775763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:53:09+00:00 2026-06-13T18:53:09+00:00

I have add address button, clicking on the button pops up a Jquery Dialog

  • 0

I have “add address” button, clicking on the button pops up a Jquery Dialog to fill address information with house number, Street, City , County, State, Country and Postal Code.
I would like to start my tabbing from house number but the focus always sets close button on the title bar.

        <f:view>
    <body onload="sartup()">
        <h:form id="form1">
            <h:panelGroup >
                <h:outputLabel value="House Number" styleClass="label" id="hnoLbl"></h:outputLabel>
                <h:inputText id="hnoId" value="#{somebackingbean.address1}"></h:inputText>
            </h:panelGroup>
            <h:panelGroup>
                <h:outputLabel value="Street" styleClass="label" id="streetLbl"></h:outputLabel>
                    <h:inputText  id="streetID" value="#{somebackingbean.address2}" ></h:inputText>
            </h:panelGroup>         
        </h:form>
    </body>
</f:view>

I tried setting focus using the following JavaScript:

    Function startup(){
    document.getElementById("form1:hnoLbl").triggerHandler("focus");
    }

and

     Function startup(){
    document.getElementById("form1:hnoLbl").focus();
    }

but it does not work. I prefer using keyboard would like the cursor to directly point at the first text field. What can I do to start tabbing from house number?
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:53:11+00:00Added an answer on June 13, 2026 at 6:53 pm

    Try set it up when the dialog has opened, in the open event of the dialog:

    $( "#yourdialog" ).dialog({
       open: function() {
          $("#form1:hnoLbl").focus();
       }
    });
    

    UPDATE:
    According to your comments you cannot execute code from the open event, so try to give focus to the field on a setTimeout() call that fires once the dialog has already loaded, like this:

    setTimeout(function() {
       document.getElementById("form1:hnoLbl").focus();
    }, 400); //adjust the duration accordingly if needed
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 QLineEdits (say Name, Address & Phone No.), a QPushButton (Add button)
I have a e-mail address validator but I need to add special characters as
I have a C#.NET Outlook 2007 add-in that has to access the address book
I have to add a custom layout in a relative layout on a button
I have an add this button on the website that is rendering a border
I have two textboxes and an add button. When you click add it generates
I have an about menu button and wish to add a contact message with
I have a page where users can add multiple email address to the form.
I have to add a column whose default value is not null by default
I have to add one month to todays date and have to get date

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.