jQuery confirmation modal dialog box, then direct user to page
<p>I have a link on our site that direct members to a health tool.</p>

<p>We are going to be phasing this tool out in 90 days, and the members will have to either export, or print all of their data that they have entered, because the new system will not be able to integrate their data.</p>

<p>What I want to do is put a jQuery dialog modal box that says: </p>

<p>"We are phasing out this tool on April 15, 2012. Please export and/or print your data that you would like to retain as it will no longer be available."</p>

<p>Then there would be a "OK" button, and they direct the user to the health tool.</p>

<p>I have the jQuery lib and jQuery UI core.js and UI dialog.js installed and functional.</p>

<p>I viewed the jQuery docs and see the modal dialog box example and saw an example on this site as well. </p>

<p>I call the following scripts in the head:</p>

<pre><code>&lt;head&gt;
&lt;script src="/js/jquery-1.3.2.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="/js/ui.core.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="/js/ui.dialog.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;
</code></pre>

<p>Then Here is the page:</p>

<pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
    $("#dialog").dialog({
      autoOpen: false,
      modal: true
    });
  });

  $(".confirmLink").click(function(e) {
    e.preventDefault();
    var targetUrl = $(this).attr("href");

    $("#dialog").dialog({
      buttons : {
        "Confirm" : function() {
          window.location.href = targetUrl;
        },
        "Cancel" : function() {
          $(this).dialog("close");
        }
      }
    });

    $("#dialog").dialog("open");
  });
&lt;/script&gt;

&lt;div id="dialog" title="Confirmation Required"&gt;
Please confirm.
&lt;/div&gt;

&lt;a class="confirmLink" href="/health-tool.aspx"&gt;Link to Health Tool&lt;/a&gt;
</code></pre>

<p>However, I get an error that says: "Object doesnt support this property or method"
and references this line: $(document).ready(function() {</p>

<p>Your assistance is greatly appreciated.</p>
