0

We are trying to develop a timeout feature in application where we want alert user saying that the application log out will happen in x time will display the count down timer. Once the timeout we will be force fully logging out the user. For displaying the log out information we thought of displaying a pop-up with relevant message which can close itself and initiate log out on timeout. The problem with display of pop-up is we have to send a request to the server which will reset the session timeout set at server level.

For achieving the above requirement is there any way to open a pop-up without sending the request to server. We will decide the content of the pop-up using DHTML.

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
vcosk
  • 2,894
  • 2
  • 23
  • 23
  • Note: We don't want to use any kindly of local creation of html file and rendering it. We are using JSPs and servlets in out application. – vcosk Jul 14 '09 at 06:12
  • 1
    You might wanna have a look at "modals", as they are fake pop-ups in the same window, and a lot easier to handle. And also, they won't be stopped by pop-up blockers. – peirix Jul 14 '09 at 06:18
  • Thanks a lot for all your input, we will try them out and will update the results :) – vcosk Jul 14 '09 at 07:44

3 Answers3

3

I agree with Guillaume that a DHTML window would be better, but this should work if you want a real popup window.

var win = window.open('about:blank');
win.document.body.innerHTML = '[Window body content here]';
Jason Harwig
  • 43,743
  • 5
  • 43
  • 44
1

You could use jQuery both to display an alert with a count down and to send an ajax request to the server resetting the session timeout, without having to refresh the screen.

Kind regards, Guillaume Hanique

Guillaume Hanique
  • 405
  • 1
  • 3
  • 8
1

Best bet (simple, poerful, documented): http://digitarald.de/project/roar/

Relies on Mootools.

SamGoody
  • 13,758
  • 9
  • 81
  • 91
  • It was not possible to implement this solution in our product but thanks for suggesting it. We will implement it in our new products :) – vcosk Jul 17 '09 at 11:45