I also tried creating the Object on document.ready but still the same
issue. See Below. Thanks again for any help .
function popUp(divId,initWidth,initHeight,modal,title, url)
{
initWidth = (initWidth == null) ? 800 : initWidth;
initHeight = (initHeight == null) ? 500 : initHeight;
modal = (modal==null) ? true : modal;
title = (title==null) ? "" : title;
$(divId).dialog("open");
}
$(document).ready(function(){
var divId ="#example";
$(divId).dialog({
autoOpen: false,
height: 800,
width: 500,
modal: true,
title: "Untitled",
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');}
});
});
On Mar 31, 10:01 am, Graham Wallis <[email protected]> wrote:
> This is similar to this problem found
> herehttp://www.nabble.com/Dialog-box-not-honouring-height-when-re-opened-....
>
> 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
-~----------~----~----~----~------~----~------~--~---