Destroy a Dialog and Re-Create
Hi everybody,
I
have a problem in making a new instance of a dialog that contains a div contained in a page.
The dialog does not open after destroy, I want another instance.......
HTML page:
- <div id="test">
- <input type="text" id="name" name="name" /><br />
- <input type="radio" id="foo1" name="name1" /><br />
- <input type="radio" id="foo2" name="name1" /><br />
- </div>
- <br />
- <input type="button" id="openDialog" value="Open" />
JS page:
- $('#test').dialog({
- autoOpen: false,
- buttons: {
"Exit": function() {
$(this).dialog('destroy')
},
- });
- $('#openDialog').click(function() {
- .... get mysql data via ajax and fill the dialog....
- $('#test').dialog('open');
- });