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
Solved

How to handle ASP Session with Time Counter for dynamic site?

Posted on 2007-11-20
3
709 Views
Last Modified: 2012-06-21
We create a pop up with some message in JavaScript file. This will load after few seconds like 15sec. when page load. Since we place in a dynamic page, the popup loads every time when page loads e.g. /items.asp?Mc=HOZ , /items.asp?Mc=CH  or index.asp or any page... For avoiding multiple display of popup, we want to use session, i.e. for one session popup will display only once.
But the problem arises in using time counter...¦ We want to display that popup after 15 sec of loading time. When page loads & we waited for 15 sec it works fine... popup is displayed...
If we'™re not waiting 15 sec, and click on the other dynamic or asp links...¦ pop wasn'™t displayed in that time.

Can anybody have any solution or reference regarding this problem?

Thanks
0
Comment
Question by:psaini172000
3 Comments
 
LVL 5

Accepted Solution

by:
gocemi earned 500 total points
ID: 20318355
Hi,

Since problem exists when user navigates out of the page, timer stops and pop up is never shown ,
maybe you need to add another validation before leaving the page. I.e, add javascript body.onunload ='ceckPopUpShown';

What you need to do is to create var

var refToPopUp;

code to pop up window in here and instead of just window.open(urlto pop up),
Change that line to
refToPopUp = window.open(urlto pop up),

and on event body.onunload

function ceckPopUpShown()
{
if( refToPopUp == null )
//this means no window was open
{
//show window
window.open(urlto pop up)
}
}

body.onunload is event that is fired when body is unloaded and new page is to be shown in the browser
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21135885
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

839 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