Announcement

Collapse
No announcement yet.

Focus on field after auto-insert

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

  • Focus on field after auto-insert

    Hi

    Searching for a solution to insert a record in grid in automatic mode after change focus on a single field ( in this case the field name is "barcode" ), i've found this javascript than run very well
    function sc_barcode_onchange()
    {
    var n = F1.elements["sc_contr_vert"].value;
    n = (n - 1);
    findPos(this);
    nm_atualiza_line('incluir', n);
    document.F1.barcode.focus();
    }

    but now my problem is: how to put the focus on the first field of a grid after insert done in the way described before? I tried this but does not work
    function sc_form_onload()
    {
    document.F1.barcode.focus();
    }

    Someone has already dealt with a similar problem? The environment is SC 7.0.009

    Giorgio
    Giorgio Bravi
    Dolphin Software & Thinkware
    www.dolphin.it

  • #2
    There's an option to set the first-field focus in the menu's somewhere. Did you try that too? I assume you mean editable grid view?
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Already tried but does not work. The focus is lost somewhere.
      I confirm editable grid view.

      Giorgio
      Giorgio Bravi
      Dolphin Software & Thinkware
      www.dolphin.it

      Comment


      • #4
        No one who has any ideas on how to resolve this situation?
        Giorgio Bravi
        Dolphin Software & Thinkware
        www.dolphin.it

        Comment


        • #5
          Hello,

          Have you tried to set focus using our macro?

          sc_set_focus: http://downloads.scriptcase.com.br/d...m#sc_set_focus

          regards,
          Bernhard Bernsmann

          Comment


          • #6
            I tried with a form master - detail, and i need when click button insert new on detail, that focus on one field and do not works.
            i tried both opcins in SC.

            1. in settings: Field with initial focus listbox
            2. sc_set_focus('field_name');

            Any idea?

            Comment


            • #7
              Solved!!!

              Follow this Thread

              Thanks to all for suggestions.
              Giorgio Bravi
              Dolphin Software & Thinkware
              www.dolphin.it

              Comment

              Working...
              X