Announcement

Collapse
No announcement yet.

[HOW DO I] Launch a pop up page and set a cookie?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HOW DO I] Launch a pop up page and set a cookie?

    Basically, what I want to do is check to see if a cookie has been set. If the cookie has not been set I want it to do a javascript function [launch()] which would open up a pop-up window one time. So far I've put this code:

    Code:
    if (!$cookie_splash_shop) {
    	
    	$cookie_name = "cookie_splash_shop";
    	
    	$cookie_value = 1;
    	
    	$cookie_expire = time()+86400;
    	
    	$cookie_domain = ".sohh.com";
    	
    	setcookie($cookie_name,$cookie_value,$cookie_expire,"/",$cookie_domain,0);
    	
    }
    in the phpinclude template. But where do I put:

    <script language="JavaScript" type="text/javascript">

    <!--

    launch('/shop/pop_up_frameset.php','extra','640','480');

    //-->

    </script>

    ?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X