![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've read lots of posts about how to use multiple body onloads, but I can't get it to work at all. I have a pop-up window that pops up after about 20 seconds, but I also want an x-it pop window to popup when they leave the site. |
|
Here's the 2 onloads body onLoad="setTimeout('popupPage()', 7000);" bgcolor="#FFFFFF" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="10" link="#cc0000" vlink="#dd3333" body onunload="xit()" bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000099" vlink="#006633" alink="#006633" |
#3
| |||
| |||
|
|
Terri wrote: I've read lots of posts about how to use multiple body onloads, but I can't get it to work at all. I have a pop-up window that pops up after about 20 seconds, but I also want an x-it pop window to popup when they leave the site. Well, my first suggestion - *please* don't do this. Any site that magically creates pop-ups without warning immediately loses a lot of credibility points, and tends to end up with lower traffic than might otherwise be the case. If a user wants to leave your site becuase of a link you have placed there, then let them go... Here's the 2 onloads body onLoad="setTimeout('popupPage()', 7000);" bgcolor="#FFFFFF" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="10" link="#cc0000" vlink="#dd3333" body onunload="xit()" bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000099" vlink="#006633" alink="#006633" On the same page?? Well, the would be 2 <body> tags, which is not correct HTML... Webko |
#4
| |||
| |||
|
|
I know you can't have two body tags. There's some way to combine both actions with the one body tag, by using a semi-colon in between the 2 call for actions, but I can't figure out exactly where to combine these 2. |
#5
| |||
| |||
|
|
I've read lots of posts about how to use multiple body onloads, but I can't get it to work at all. I have a pop-up window that pops up after about 20 seconds, but I also want an x-it pop window to popup when they leave the site. I tried putting the semi-colon in several different places, but the examples I find are all much more simple and shorter. Can anyone please help? I would be so grateful. Here's the 2 scripts I have within the <head> tags. SCRIPT LANGUAGE="JavaScript" !-- Begin function popupPage() { var page = "popup.html"; windowprops = "height=200,width=400,location=no," + "scrollbars=yes,menubars=no,toolbars=no,resizable= yes"; window.open(page, "Popup", windowprops); } // End -- /script _______________________________________________ script language="JavaScript" !-- begin x-it code var exit=true; function xit() { if (exit) window.open('popup.htm','','toolbar=no,menubar=no, scrollbars=yes,resizable=y |
|
} // end x-it code -- /script ________________________________________________ Here's the 2 onloads body onLoad="setTimeout('popupPage()', 7000);" bgcolor="#FFFFFF" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="10" link="#cc0000" vlink="#dd3333" body onunload="xit()" bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000099" vlink="#006633" alink="#006633" How do I combine the 2 onloads? Thanks, Terri www.thinkandreachpar.com |
![]() |
| Thread Tools | |
| Display Modes | |
| |