?
Solved

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

Posted on 2007-11-20
3
Medium Priority
?
712 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
[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
3 Comments
 
LVL 5

Accepted Solution

by:
gocemi earned 2000 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Suggested Courses

770 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