aikman2x
11-04-2003, 09:29 PM
This might be a common question, but I have been searching for a way to redirect my personal domain name to my affiliate website url, and upon the visitor leaving my affiliate url website, have a seperate popup window to get feedback from the user using the onUnload feature.
I have tried inline frames, regular frames, and even tried to copy the code from another website that attempts to use an opening popup and an ending popup. The exit popup doesn't work for that particular website but I have included the code in the event that perhaps it's just an oversight by the original person.
Code follows:
<script language="JavaScript">
function openpopup(){
var popurl="http://www.plan-info.com/welcome.html"
winpops=window.open(popurl,"","width=500,height=600,left=410,top=15")
}
openpopup()
var exit=true;
function UnloadWin(){
if (exit)
window.open("exitmsg.html","_blank"," toolbar=no,menubar=no,scrollbars=no,location=no,st
atus=no,width=500,height=500");
}
if ((self.location != 'http://www.prepaidlegal.com/info/adair/') && (top.location == location)) {
self.location = 'http://www.prepaidlegal.com/info/adair/';
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
</script>
</head>
<html>
<frameset framespacing="0" border="0" frameborder="0" rows="100%">
<frame name="bottom" src="http://www.prepaidlegal.com/info/adair" scrolling="auto">
<noframes>
Welcome to Prepaid Legal Services. <a href="http://www.prepaidlegal.com/info/adair">Click here for pricing!</a>
Your browser does not support inline frames or is currently configured not to display inline frames. Please go to <a href="http://www.prepaidlegal.com/info/adair">http://www.prepaidlegal.com/info/adair</a> for more info on Prepaid Legal Services.
</noframes>
</frameset>
<body>
End of Included Code.
Below are two seperate codes that work individually, but not together... any ideas?
CODE 1 (This one is for the popup)
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL: http://fineline.xs.mw -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men
ubar=0,resizable=0,width=475,height=470,left=410,t
op=45');");
}
// End -->
</script>
<base target="_blank">
</head>
<BODY onunLoad="javascriptopUp('http://www.altenterprises.com/popup.htm')">
END CODE 1
START CODE 2 (for the redirect)
<script language="JavaScript">
if ((self.location != 'http://www.prepaidlegal.com/info/mjalt/') && (top.location == location)) {
self.location = 'http://www.prepaidlegal.com/info/mjalt/';
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
</script>
</head>
<body>
<frameset framespacing="0" border="0" frameborder="0" rows="100%">
<frame name="bottom" src="http://www.prepaidlegal.com/info/mjalt" scrolling="auto">
<noframes>
Welcome to Prepaid Legal Services. <a href="http://www.prepaidlegal.com/info/mjalt">Click here for pricing!</a>
Your browser does not support inline frames or is currently configured not to display inline frames. Please go to <a href="http://www.prepaidlegal.com/info/mjalt">http://www.prepaidlegal.com/info/mjalt</a> for more info on Prepaid Legal Services.
</noframes>
</frameset>
</body>
END CODE 2.
I'm stuck and could really use some help. Thank you in advance for your help.
I have tried inline frames, regular frames, and even tried to copy the code from another website that attempts to use an opening popup and an ending popup. The exit popup doesn't work for that particular website but I have included the code in the event that perhaps it's just an oversight by the original person.
Code follows:
<script language="JavaScript">
function openpopup(){
var popurl="http://www.plan-info.com/welcome.html"
winpops=window.open(popurl,"","width=500,height=600,left=410,top=15")
}
openpopup()
var exit=true;
function UnloadWin(){
if (exit)
window.open("exitmsg.html","_blank"," toolbar=no,menubar=no,scrollbars=no,location=no,st
atus=no,width=500,height=500");
}
if ((self.location != 'http://www.prepaidlegal.com/info/adair/') && (top.location == location)) {
self.location = 'http://www.prepaidlegal.com/info/adair/';
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
</script>
</head>
<html>
<frameset framespacing="0" border="0" frameborder="0" rows="100%">
<frame name="bottom" src="http://www.prepaidlegal.com/info/adair" scrolling="auto">
<noframes>
Welcome to Prepaid Legal Services. <a href="http://www.prepaidlegal.com/info/adair">Click here for pricing!</a>
Your browser does not support inline frames or is currently configured not to display inline frames. Please go to <a href="http://www.prepaidlegal.com/info/adair">http://www.prepaidlegal.com/info/adair</a> for more info on Prepaid Legal Services.
</noframes>
</frameset>
<body>
End of Included Code.
Below are two seperate codes that work individually, but not together... any ideas?
CODE 1 (This one is for the popup)
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by: Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL: http://fineline.xs.mw -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men
ubar=0,resizable=0,width=475,height=470,left=410,t
op=45');");
}
// End -->
</script>
<base target="_blank">
</head>
<BODY onunLoad="javascriptopUp('http://www.altenterprises.com/popup.htm')">
END CODE 1
START CODE 2 (for the redirect)
<script language="JavaScript">
if ((self.location != 'http://www.prepaidlegal.com/info/mjalt/') && (top.location == location)) {
self.location = 'http://www.prepaidlegal.com/info/mjalt/';
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
</script>
</head>
<body>
<frameset framespacing="0" border="0" frameborder="0" rows="100%">
<frame name="bottom" src="http://www.prepaidlegal.com/info/mjalt" scrolling="auto">
<noframes>
Welcome to Prepaid Legal Services. <a href="http://www.prepaidlegal.com/info/mjalt">Click here for pricing!</a>
Your browser does not support inline frames or is currently configured not to display inline frames. Please go to <a href="http://www.prepaidlegal.com/info/mjalt">http://www.prepaidlegal.com/info/mjalt</a> for more info on Prepaid Legal Services.
</noframes>
</frameset>
</body>
END CODE 2.
I'm stuck and could really use some help. Thank you in advance for your help.