locked
maintain focus on the field when save the form using field onchange RRS feed

  • General discussion

  • hi frnds,

             i have called the save event in field onchange... when  the form save, scroll is going upwards.So again i need to search a field which i click.. so i need a solution to keep the focus on the same field after save called for the form..Pls give me a solution as soon as possible.

          Thanx in advance..


    Arun Kumar G


    • Edited by Aronkumar Saturday, July 6, 2013 12:50 PM
    Saturday, July 6, 2013 12:49 PM

All replies

  • Arun, doing a save on the onChange() event doesn't sound to be a good idea to me, instead you may try setting the submitmode of the field in question to "always" and use the OOB save button to save the changes.

    Also, to answer your original question how do you keep the focus set on a particular field, it's kinda tricky, don't know if you'll find a way out to it.


    Please don't forget to mark the answer, if it helps. Piyush

    Saturday, July 6, 2013 5:34 PM
  • Piyush, thanks for the suggestion. The reason for using the save event in onChange() is to overcome the manual save button click in order to take effect the changes instantly. So after that event, we need to set foucs on the onchange field. Any suggestion would be really helpful..  


    Arun Kumar G

    Monday, July 8, 2013 4:55 AM
  • take an attribute as lastfocus on form of text type  and save name of current attribute in lastfocus .

    and onload of form set focus of attribute which place in lastfocus.


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Monday, July 8, 2013 7:25 AM
  • Santosh, i hv tried your suggestion and but for some entities this option is not working. After setting the focus on last modified field in onLoad event, the focus first goes to the last modified field and suddenly passed to first enabled field in first tab of entity form. let me know if i m not clear. Please help on this.


    Arun Kumar G

    Monday, July 8, 2013 10:24 AM
  • Arun ,

    Function should be last in onload event or last command to execute.

    and i think if this work for some entity and on some not, their should some workaround.


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    Monday, July 8, 2013 11:15 AM
  • yeah set focus function is the last function to execute in onload event but it is not working. The same piece of code is executing in all entities as last web resource. i tried to set focus on some other field first and then back to actual field but result resembles same. Is any other workaround to fix this issue.

    Arun Kumar G

    Monday, July 8, 2013 11:33 AM
  • Hi guys,

    Still i couldnt found a way to fix that problem. Any suggestion/links would be helpful. Please raise if i m not clear in concept.


    Arun Kumar G

    Monday, July 22, 2013 10:45 AM