Solved

Showing alert() even though IE is Minimized how?

Posted on 2003-12-12
2
223 Views
Last Modified: 2010-04-06
Hello Experts,

       My purpose is to show an alert message when the session is about to expire. But the problem with the alert is that the user can see it only when the IE is active. I would like to know of a method of displaying warning messages wherein the message display would pop up even if the IE is not active / in a minimized state.


Thanks
Bharat
0
Comment
Question by:bharat_mane
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
prohacx earned 100 total points
ID: 9928344
Hi there!

Indeed, the alert is not pushed through if your IE is minimized...

I tried it with a showModalDialog in stead of an alert and set focus to your window before calling the showModalDialog and it works fine with me:


<%@ Language=VBScript %>
<%
      session.Timeout = 2
%>

<HTML>
<HEAD>

<%
Response.Write "<script type=""text/javascript"">" & vbcrlf

Response.Write "var minutesLeft = " & session.Timeout & ";" & vbcrlf

Response.Write "function checkTimeout() {" & vbcrlf

Response.Write "      if (minutesLeft == 1) { " & vbcrlf
'Response.Write "            alert('Your session will expire in 1 minute!'); " & vbcrlf
Response.Write "            window.focus();" & vbcrlf
Response.Write "            window.showModalDialog('warn.html','','help: no;');" & vbcrlf
Response.Write "" & vbcrlf

Response.Write "      }" & vbcrlf

Response.Write "      minutesLeft -= 1;" & vbcrlf
Response.Write "      setTimeout(""checkTimeout()"", 60000);" & vbcrlf

Response.Write "}" & vbcrlf

Response.Write "</script>" & vbcrlf
%>

</HEAD>
<BODY onload="checkTimeout();">

<P>wait for an alert...</P>

</BODY>
</HTML>

Have fun!
0
 

Author Comment

by:bharat_mane
ID: 9933050
hi  prohacx,

    This is cool, thanks a lot it works well..
Thanks once again
 
   
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question