• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

set focus issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • set focus issue

    I am trying to set focus on a field after hitting my search button. i have named the widget and in my rpg code set the widget and focus the field:
    SetResponse('success': 'true');
    SetWidget('mainbarcodeform');
    SetResponse('formFieldFocus': 'PRODUCTIONBARCODE');

    i see the cursor go into the appropriate field for a second and then it loses focus. we have other programs setup were this technique works. the only thing i can see different is that my field is inside a tab container. am i missing a step or is there a possible bug.
    Attached Files

  • #2
    What end's up getting focus?

    Comment


    • #3
      visually i cant tell. is there a way to determine this.

      Comment


      • #4
        i am scanning into a field, and i keep losing focus after the scan.. i tried added a helper program to setfocus on the field but its still not working. see attached layout
        Attached Files

        Comment


        • #5
          Does the form have a button set as primary? If so, what is that button doing?

          Comment


          • #6
            yes there is a button but that is ONLY used if the user is manually keying a barcode... 99% of the time the user will be scanning a barcode so we just want them to keep scanning...not press any buttons... i am wondering if this for needs to be taken out of the tab container?

            Comment


            • #7
              Ok, however, is it a primary button, aka, if you are on the field and hit enter, does it process the button's actions if the field is valid?

              Comment


              • #8
                yes the button is set as the primary button.

                Comment


                • #9
                  Ok, so I have to assume that the scanner is placing the value in the field and issuing an enter key event that causes your button's actions to run. What are the actions on the button, and with that said, do you see them happening after you scan in that field?

                  Comment


                  • #10
                    attached shows a snip of the scan button... i thought by adding the script that worked in another area it would work inside the form also.
                    Attached Files

                    Comment


                    • #11
                      No, that was specific to that button because that script is run when the button is clicked

                      If you're on the latest 6.2, I would disable auto-focus and maintain focus yourself

                      ————
                      NAB - General: Added new app-level setting to disable auto-focus. When checked, no field or widget will auto-focus; developer must set focus manually

                      Comment

                      Working...
                      X