Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI Dialog Issue With IE

I am using the new jQuery 1.3.2 and jQuery-ui-1.7 libraries along with the UI Dialog. I have a div tag with several form elements (textbox, checkbox, etc.) in it. Upon page load, jQuery shows the div as a dialog. This works absolutely fine in FF, but in IE, the height of the div is wrong. It is just showing the title bar a bit of the content. I explicitly set the height when creating the div. If I set the height option after opening the dialog, the height is corrected, but the content is blank (shows the top third of a textbox). If I allow the dialog to be resizable, if you resize it in IE it works fine, but I don't want to force IE users to resize just to see the contents. Any ideas? Here is the code I use to create the dialog:

$('#dialogDiv').dialog({      bgiframe: true,      height: 400,      width: 620,      modal: true,      draggable: true,      resizable: false,      close: function(event, ui) {         if($('#agree').val() != '1')             location.href = 'somepage.html';     } }); 
like image 458
Dan Appleyard Avatar asked Mar 10 '09 16:03

Dan Appleyard


1 Answers

After doing some Google searches, I found the true answer to the question. It is caused by an incompatible Doctype. Please go to http://osdir.com/ml/jquery-ui/2009-08/msg00388.html for more information.

I tried it on my codes and the solution in this URL DOES solve the problem.

like image 190
Monte Chan Avatar answered Sep 20 '22 11:09

Monte Chan