title: Set cookie - jquery modal Confirm dialogue
body: <p>This jquery_modal_confirm_dialogue is working after many experiments.
  When our visitors agree to our Terms of Use, they are redirected to the product page <strong>products.html</strong></p>
  
  <p>I desperately need to set a cookie.
   - if they do not agree, when they attempt to visit products.html, this
     is not visible and displays the modal dialogue again</p>
  
  <p>Could you please give me a hint?
  (jquery 1.3.2.min.js)</p>
  
  <p><strong>This is my jqmodal.js</strong></p>
  
  <pre><code>function confirm(msg,callback) {
    $('#confirm')
      .jqmShow()
      .find('p.jqmConfirmMsg')
        .html(msg)
      .end()
      .find(':submit:visible')
        .click(function(){
          if(this.value == 'yes')
            (typeof callback == 'string') ?
              window.location.href = callback :
              callback();
          $('#confirm').jqmHide();
        });
  }
  
  
  $().ready(function() {
    $('#confirm').jqm({overlay: 88, modal: true, trigger: false});
  
    // trigger a confirm whenever links of class alert are pressed.
    $('a.confirm').click(function() { 
      confirm('About to visit: '+this.href+' !',this.href); 
      return false;
    });
  });// JavaScript Document
  </code></pre>
  
  <p><strong>This is my index.html:</strong></p>
  
  <pre><code> &lt;a href="http://products.html/" class="confirm"&gt;Products&lt;/a&gt; 
  
      &lt;div class="jqmConfirm" id="confirm"&gt;
  
      &lt;div id="ex3b" class="jqmConfirmWindow"&gt;
          &lt;div class="jqmConfirmTitle clearfix"&gt;
              &lt;h1&gt;Terms of Use&lt;/h1&gt;
          &lt;/div&gt;
  
          &lt;div class="jqmConfirmContent"&gt;
          &lt;p class="jqmConfirmMsg"&gt;&lt;/p&gt;
              &lt;p&gt;Important legal information&lt;/p&gt;&lt;/div&gt;
  
          &lt;input type="submit" value="Decline" /&gt;
          &lt;input type="submit" value="Proceed" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>