[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2007-11-20
3
Medium Priority
?
718 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
2 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

Technology Partners: 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

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Suggested Courses

864 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