Menu
I need help with a JS function.
In a PHP form I have a field and, when the focus is lost (moving to another field), it is immediately validated by an onBlur event which in case of error opens a sweet alert.
So far everything Ok.
I would like, however, that when the alert is closed (click OK) the focus returns to the invalid field.
To do this I was suggested to create a small javascript function; as I’m not js expert, can someone help me with an example?
Thanks and best regards.