This is similar to this problem found here
http://www.nabble.com/Dialog-box-not-honouring-height-when-re-opened-td21258793s27240.html.
Basically every other open of a dialog causes the dialog to not honor
the height. Any help would be much appreciated. Thank you.
Below is the code I am using.
Jscript:
popUp("#example",
800,700,true,"hello","somethingReturnedfromJsp.html");
HTML:
<div id ="example"><iframe frameborder = 0 src= "" ></iframe></div>
Script:
function popUp(divId, initWidth, initHeight, modal, title, url)
{
document.getElementById(divId.substr
(1,divId.length)).firstChild.setAttribute('src',url);
initWidth = (initWidth == null) ? 800 : initWidth;
initHeight = (initHeight == null) ? 500 : initHeight;
modal = (modal==null) ? true : modal;
title = (title==null) ? "" : title;
$(divId).dialog({
autoOpen: false,
height: initHeight,
width: initWidth,
modal: modal,
title: title,
open: function()
{ $(divId+' iframe').height($(this).height()-20); $
(divId+'
iframe').width($(this).width()-10); },
resize: function() { $(divId+' iframe').hide(); },
resizeStop: function() { $(divId+' iframe').show();
$(divId+' iframe').height($(this).height()-20);
$(divId+' iframe').width($(this).width()-10); },
dragStop:function() {
$(this).dialog('option', 'height', $(this).height()+50);
},
close:function() {$(this).dialog('destroy');}
});
$(divId).dialog("open");
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---