I'm sure this is a very simple question for anyone who know's anything about JavaScript (I don't). I'm building an amateur paysite for my fiance and I just put up a splash page until we get the site built. I'm tring to get a pop-up window to appear from http://www.naughtyallie.com only when the surfer leaves the page by closing the browser window or using the browser's back button. We do not want the pop-up to appear when they click on the link taking them to the sample pics page. Can one of you JavaScript Gurus have a look and let me know what I'm doing wrong? Is there a way Iwe can set this up so that the surfer gets the pop-up whether they exit from http://www.naughtyallie.com or http://www.naughtyallie.com/samplepics.htm or any of the pic pages linked to it? Thanks - Charlie
JavaScript Gurus - Help (pics)
Collapse
X
-
Charlie,
Some sponsors give help on this in their marketing areas. Silvercash has some info on this, I'm sure there are others out there.
-LDComment
-
-
Dont know if this will show up....but you need to replace the JavaScript in your header....replace it with this:
var win=null;
var exit = true;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(exit){
if(pos=="random"){myleft=(screen.width)?Math.floor (Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.rand om()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.wi dth-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
if(pos=="custom"){myleft=192;mytop=144}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=yes,directories=yes,stat us=yes,menubar=yes,toolbar=yes,resizable=yes";win= window.open(mypage,myname,settings);
win.focus();}}Comment
-
That will only work with Netscape 6 and IE 5.5 or later.
I'd post some info here, but if i do I'll probably be called "stalker' by T**SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.Comment
-
and now combine vXS's post and Burnie's post....
that is, add:
if (exit)
{
#original code
}
and add:
onclick="exit=false" wherever you have links
if you are having problems, ICQ me, I'll help you out.Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip ManagerComment
-
yep....I looked at his page and he already had the onclick="exit=false" in the link...he was just missing the if(exit) in the script code...guess I should have stated that he needed that also...Originally posted by woj
and now combine vXS's post and Burnie's post....
that is, add:
if (exit)
{
#original code
}
and add:
onclick="exit=false" wherever you have links
if you are having problems, ICQ me, I'll help you out.
Comment
-
Good link! I've been looking for stuff on XML, and they have it.Originally posted by maxcom
http://irt.org
OzComment
-
FUUUUUUUUUUUUUUUUCCCCCCCCCCK MAN!!! I can't figure this fucking shit out!!! I changed the header code to what vx'S posted and the fucking pop-up window wouldnt open at all. Now I'm back to my original code and the fucking window is still coming up when you click on the link to the sample pics page. What the fuck do I need to do to stop the pop-up window from appearing when I click on the link to the sample pages>
Comment



Comment