Sometimes it is necessary to set the focus to the first available form control. The problem is that complex web pages can contain multiple forms and each form individually can contain hidden or disabled elements and controls that cannot accept focus. In this tutorial we will create a function which iterates through all forms until it finds the first available form control.