0

I am building and app in Telerik App Builder, and I am attempting to create functionality so that when a submit button is pressed, the page checks if a certain required field has a valid value, and, if not, scrolls back up to that field and focuses on it.

The difficulty is that I have been unable to find any documentation on how to achieve the scroll and focus event, given a DOM element. How would this best be achieved?

Thanks,

CBlumey
  • 40
  • 1
  • 7

1 Answers1

0

If you're using jQuery the easiest way to handle it is using the focus event: https://api.jquery.com/focus/

Rob Lauer
  • 3,075
  • 1
  • 32
  • 44
  • Thank you! I couldn't find whether or not it actually was able to shift the screen when I looked through the jquery documentation! – CBlumey Jan 07 '16 at 20:53