Thanks!  Works like a charm (and thanks for the tip on inline _javascript_... still lots to learn).



Bohdan Ganicky wrote:
Hi Bob,

just remove the close callback. It doesn't make sense to close the
dialog on close callback. It's a candidate for infinite loop. ;)

And one more thing. Try to avoid inline _javascript_, it's nasty. You
can do it cleaner, take a look here: http://jsbin.com/ozife

--
Bohdan

On Oct 31, 6:34 pm, Bob K <[email protected]> wrote:
  
I need users to be able to open/close/reopen a dialog.  I've read
other posts which imply this should work, but my minimal test below
fails (when I click on the href link, it opens properly.  When I try
to reopen it a second time, nothing happens).

Am I just staring at this too long and missing something obvious?

Thanks...

<script type="text/_javascript_">
$(function(){
    $("#terms_dialog").dialog({
      bgiframe: true,
      autoOpen: false,
      height: 400,
      width: 500,
      modal: true,
      buttons: {
        Cancel: function() {
          $("#terms_dialog").dialog('close');
        },
      },
      close: function() {
          $("#terms_dialog").dialog('close');
      },
    });

});

function show_terms_dialog() {
  $("#terms_dialog").dialog('open');}

</script>

<p> Hello, please agree to our <a href="" class="moz-txt-link-rfc2396E" href="_javascript_:show_terms_dialog()">"_javascript_:show_terms_dialog
()">terms</a> </p>

<div id="terms_dialog" title="Terms Of Use Agreement">
<p> This is a dialog </p>
</div>
    

--

You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.


  

--

You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.

Reply via email to