views:

162

answers:

2

I've got a jQuery UI dialog setup on a timer based on the session timeout.

The dialog pops two minutes before the actual session times out and gives the user a one-minute countdown in the dialog. When the countdown runs out, it closes the dialog and redirects to the logout URL.

This actually logs the user out one minute before session timeout, but it gives me some time to run a couple of other pieces to save the data they already entered.

The issue is that in IE and Safari (both PC and Mac), the user is pulled back to the browser tab that my system is on when the dialog pops. If they have opened another tab to search google or something I'd like for the dialog to pop, run the count down and redirect to the logout without pulling them from their other browser tab. Not show over their current tab - just show in the background in case they happen to come back to my system.

Any thoughts on how to accomplish this?

Thanks

A: 

I'm not sure your exact situation but try something like the following:

$('.selector').dialog({ stack: false });

The stack option specifies whether the dialog will stack on top of other dialogs. This will cause the dialog to move to the front of other dialogs when it gains focus.

Give it a shot.

T Pops
thanks. I will.
tnriverfish
no good. thanks though.
tnriverfish
A: 

ended up just dropping in a whole new set up timeout and redirect script borrowed from another site. this one has links instead of using jquery dialog.

tnriverfish