Hi,
I have found a bug in the jquery UI where the dialog does not
automatically resize to the correct height of the inner html when it
is launched twice on the same page, each of the times that it is
launched the content is appended by a function that does a GET query
through AJAX.
The first time I launch the dialog the content height is set
correctly, I can then re-launch that same dialog as many times as I
want, as long as the content remains the same (though it is re-loaded
with ajax every time) the height will stay correct.
Upon opening the same dialog with different AJAX content though, the
height screws up, and sticks to the height value of the second dialog
that I opened (oddly not the first)
This is the code I use:
<pre>
function spawnDialog(id) {
$("#dialog").empty();
$.ajax({
type: "GET",
url: "index.php?method=get&id="+id,
cache: false,
success: function(html){
$("#dialog").append(html);
$("#dialog").dialog({
height: 'auto',
width:'430px',
position: [top,100],
modal:true,
resizable: true,
overlay:{
"background-color": "#000",
"opacity": "0.75",
"-moz-opacity": "0.75"
}
});
document.getElementById('dialog').style.display='block';
}
});
}
</pre>
Can anyone help me out here?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---