Is it possible to force a tab/window to take focus without an alert()? [migrated]
- by Chris Brandt
I've been working to solve some form / session timeout issues on our site. I'd like to get the users attention BEFORE this happens so that they don't lose data that they've entered into long forms.
I'm using jquery's .get to confirm with my server when the users session is set to timeout, and warn them 5 minutes before then.
I've found that if I pop an alert(), it will bring the focus back to that tab / page -- but this seems 'heavy handed'.
Is there a better way to do this?