In web2py_ajax.html I have the following line of code to set focus on
the first visible field in forms:
jQuery("input:text:not(.date):first:visible").focus();
In a view with three forms, named form1, form2, form3, the focus is
set on the first field of form2 whereas I want the focus to be set on
the first field of form1. I tried:
jQuery("input:text:not(.date):first:visible").focus();
jQuery("input.key1").focus();
... but that doesn't work. How do I set focus on the field with id
key1?
Kind regards,
Annet.