AV1611 Posted July 26, 2009 Share Posted July 26, 2009 I DO NOT know JS but I do know PHP That being said... I have the script in the head of a page: <SCRIPT TYPE="text/javascript"> <!-- function popup(mylink, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; window.open(href, windowname, 'width=400,height=200,scrollbars=yes'); return false; } //--> </SCRIPT> I have this in the body: <BODY onLoad="popup('autopopup.html', 'ad')"> It works fine except I need to change it so if the main page (index.html) is reloaded, the popup is not reloaded, but rather it doesn't nothing. My PHP Solution would be to set a session in the popup and have a clause on the <body> tag to enable/disable the popup on reload, but it seems there should be a slick JS way to do it. Suggestions? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 26, 2009 Share Posted July 26, 2009 My PHP Solution would be to set a session in the popup and have a clause on the <body> tag to enable/disable the popup on reload, but it seems there should be a slick JS way to do it. I'd go with your PHP solution. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.