setting focus to a fiels

setting focus to a fiels

how to focus a field after the alert message ? is there any code available for that ?