how to open model popup on textbox click
<p>I want to open modelpopup only when my checkbox is checked and user clicks on textbox.but how to find checkbox in this</p>

<p>for this i wrote,</p>

<pre><code>&lt;script type="text/javascript" language="javascript"&gt;
  $(function() {
    $("#x").dialog({
      autoOpen: false,
      height: 200,
      width: 500,
      modal: true
    });
    $("#y").click(function() {
      $("#x").dialog("open");
      return false;
    });
  });
&lt;/script&gt;
</code></pre>

<p>where x->id which should be opened in popup
y->textbox id</p>
