Need help with a Session Script, Show JQModal Pop-up only Once
<p>I have a JQModal alert that needs to come up when a client's site is first accessed, but not show again when the index page is accessed again from inside the site. I'm not real far along in setting up session cookies so I'll be needing some explicit help, if that's possible. I've set up a short page with the vitals on it to test with: The URL is <a href="http://www.caycecookbook.com/pop_ups/jqm_onDocReady/code.php" rel="nofollow">http://www.caycecookbook.com/pop_ups/jqm_onDocReady/code.php</a>. I'm attaching the code here.</p>

<pre><code>&lt;?php session_start();
  if( $_SESSION['visited'] ){
      //don't show the modal box
  } else {
      $_SESSION['visited'] = true;
     //show modal box;
  }
?&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1         /DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;

&lt;title&gt;Cayce CookBook&lt;/title&gt;

&lt;!-- &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; TOGGLE-INSERT DEPENDENCIES &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; --&gt;
&lt;!-- &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; TOGGLE-INSERT DEPENDENCIES &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; --&gt;
&lt;link href="css/vwd_up.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="scripts/main.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;!-- &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; TOGGLE-INSERT DEPENDENCIES &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; --&gt;
&lt;!-- &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; TOGGLE-INSERT DEPENDENCIES &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; --&gt;


&lt;!-- &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; jqMODAL DEPENDENCIES &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; --&gt;
&lt;!-- &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; jqMODAL DEPENDENCIES &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; --&gt;
&lt;script type="text/javascript" src="scripts/jquery-1.5.1.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="scripts/jqModal.js"&gt;&lt;/script&gt;
&lt;style type="text/css"&gt;
/* Optional: image cacheing. Any images contained in this div will be
    loaded offscreen, and thus cached. Caching CSS created with the help of;
    Klaus Hartl &lt;klaus.hartl@stilbuero.de&gt; */
@media projection, screen {
     div.imgCache { position: absolute; left: -8000px; top: -8000px; }
     div.imgCache img { display:block; }
}
@media print { div.imgCache { display: none; } }
&lt;/style&gt;
&lt;style type="text/css"&gt;
/* jqModal base Styling courtesy of;
  Brice Burgess &lt;bhb@iceburg.net&gt; */

/* The Window's CSS z-index value is respected (takes priority). If none is supplied,
  the Window's z-index value will be set to 3000 by default (in jqModal.js). You
  can change this value by either;
    a) supplying one via CSS
    b) passing the "zIndex" parameter. E.g.  (window).jqm({zIndex: 500}); */ 
.jqmWindow {
    display: none;
    position: fixed;
    top: 5%;
    left: 50%;
    margin-left: -265px;
    width: 530px; 
    /*width: auto;*/
    background-color:#777777;
    color: #333;
    border: 1px solid black;
    padding: 0px;
}
.jqmOverlay { background-color: #000; }
/* Fixed posistioning emulation for IE6
     Star selector used to hide definition from browsers other than IE6
     For valid CSS, use a conditional include instead */
* html .jqmWindow {
     position: absolute;
     top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
}
&lt;/style&gt;
&lt;!-- &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; jqMODAL DEPENDENCIES &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; --&gt;
&lt;!-- &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; jqMODAL DEPENDENCIES &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; --&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;script type="text/javascript"&gt; 
    $(document).ready(function() {
        $('#rename').jqm();
        $('#rename').jqmShow(); // This is the line you need to add.
    });
&lt;/script&gt; 
&lt;!-- POP-UP DIV --&gt;
&lt;DIV class="jqmWindow" id="rename" style="padding:18px 0px 12px 0px;"&gt;
&lt;TABLE align="center" width="530" border="0" cellspacing="0" cellpadding="0" bgcolor="#7777777"&gt;
&lt;TR&gt;&lt;TD align="center"&gt;&lt;P style="margin: 12px 12px 12px 12px;"&gt;&lt;img src="images/hey_there.jpg"     width="504" height="360" border="0"&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;TR&gt;&lt;TD align="center" valign="middle"&gt;&lt;P style="margin:6px 0px 0px 0px;"&gt;&lt;a href="#"     class="jqmClose" style="text-decoration:none; color:#ffffff;; font-family: arial, helvetica,     verdana, sans-serif; font-size:12px; font-weight:bold;"&gt;Close&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
