473,654 Members | 3,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Want Exit Popop Not to open inside the same site

I am using the code below to implement 1 time entry and exit popup.
The entry popup works fine, but the exit popup opens even if you
browse from one page to the other on the same site. I want it to popup
only if the user closes the browser or goes to a different site.

What is the best way to implement this ?
var isNN, isIE, loadURLs=new Array(), loadTimes=new Array(), exitURL,
loadURLno=0, scriptID, cookieVRFY;
var exit = true;

//set by user
scriptID='nrScr ipt';
cookieVRFY=1;

AddLoad('entry. asp',1);
//AddExit('exit.a sp');
function AddLoad(sURL,iT ime)
{
loadURLs[loadURLno]=sURL;
loadTimes[loadURLno]=iTime;
loadURLno++;
}
function AddExit(sURL)
{
exitURL=sURL;
}

if (parseInt(navig ator.appVersion ) >= 4) {
if (navigator.appN ame == "Netscape") {
isNN = true;
} else {
isIE = true;
}
}

function errorIgnore(e) { return true; }
function openLoadWin() {
var oldtime=0,mywin s;
for (mywins=0;mywin s<loadURLno;myw ins++)
{

var winLeft = (screen.width)/3;
var winTop = (screen.height)/3;
setTimeout("win dow.open('" + loadURLs[mywins] + "','Loadwin " + mywins
+ " ','width=350,he ight=200,top=0, left=0,scrollba rs=no
,top = " + winTop + ", left = " + winLeft +"' );self.focus(); "
,(oldtime+loadT imes[mywins])*1000+10);
oldtime+=loadTi mes[mywins];
}
return true;
}
function openExitWin() {
if (exitURL!='')
{
var ExitWin = window.
open(exitURL,'E xitWin','width= 350,height=200, top=0
,left=0,scrollb ars=yes');
self.focus();
}
return true;
}

if ( (cookieVRFY!=1) || (document.cooki e.indexOf( scriptID+'Popup PRO='
)==-1) )
{

window.onerror = errorIgnore;

if (isNN) {
document.captur eEvents(Event.U NLOAD | Event.LOAD | Event.ERROR |
Event.CLICK);
}

openLoadWin();
//window.onunload =openExitWin;

if (cookieVRFY==1) {
document.cookie =scriptID+'Popu pPRO=HeyGuys!;p ath=/';
}
}
Jul 19 '05 #1
1 1629
http://www.aspfaq.com/5001

Ray at work

"deepak" <de*********@ho tmail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
I am using the code below
if (parseInt(navig ator.appVersion ) >= 4) {
if (navigator.appN ame == "Netscape") {

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
8836
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page (same folder). The cookie is not received. Can someone explain why? I worked around this by adding a cache-control header with a value of no-cache. This fixes the problem. Unfortunately that causes another problem with Internet Explorer...
11
2126
by: Michael B. | last post by:
I'm still learning C so I've written a simple app which lets you make a contact list (stored as a linked list of structs), write it to a file, and read it back. It works fine, but I notice in my loading procedure there's a point or two where I'll malloc a struct which I then don't need, and dispose of it; I was wondering if there was some way I could optimize this kludge out of existence: void loadContacts () { int fd, bytesread; if (...
2
3729
by: moondaddy | last post by:
I have a simple sample site I'm building in asp.net 2.0. I created a master page and a default.aspx content page in the project's root directory. Then I created a subfolder called content and added some aspx pages in the 'content' folder. when these pages were created I referenced the master page so everything should be linked up OK. Now, back on default.aspx I added a linkbutton and referenced one of the aspx pages in the 'content'...
7
613
by: Jed | last post by:
I am trying to open web project in VS 2003 using the File Share method. VS is running on XP Pro (Host) and I am accessing the root web of an XP Pro install on Virtual PC (Server) running on the same machine. I have the loopback adapter running on the Host. The Host is sharing it's Internet connectivity with the loopback adapter and the Server is using the loopback it for Internet connectivity. All the networking stuff is working fine.
1
1179
by: MelHeravi | last post by:
I need to create a popup with items (small, medium, large) and attach it to a whole bunch of images. Its the same menus for all images. menus should popup around the point on the image where it was clicked. can someone send me a little sample code to do this ? do i have to create a new popup for my 100s of images ? or would i create only one and attach it to an event with x,y coordinates and popup the only one menu
2
5520
by: Anthony Sporetta | last post by:
Hi all I have a page which has an iframe, containing an external site which I have no control over. When someone clicks one of their links inside the iframe, it currently opens that link also inside the iframe. Any way to make it open the link in a new window?
2
4900
by: news.sbcglobal.net | last post by:
Back in the good old days (or bad old days depending on your point of view) when I used frames to develop some of my web sites, I was able to designate which frame I wanted a page to open in. Now that I'm learning ASP.NET 2.0, I'm having some trouble figuring out how to do something similar. My web site has a master page with one contentplaceholder. Ordinarily, I would develop another page within the same site using the master page as a...
6
7719
by: MLH | last post by:
I have a form, frmUSPSReturnReceipts, with a control named NotExpectingGreenTickets. The control's Exit event procedure follows: Private Sub NotExpectingGreenTickets_Exit(Cancel As Integer) If IsNull(Me!NotExpectingGreenTickets) Then DoCmd.CancelEvent Exit Sub End If End Sub
7
1956
by: colleen1980 | last post by:
Hi: When i run the same code with minor changes in VB it works fine but when i run in ASP it runs but it not pulling any information from the web site. Needs help Thanks, Anna. ASP CODE Const ForAppend = 8
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8494
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.