1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    504
    Vote Rating
    0
    vtswingkid is on a distinguished road

      0  

    Default basicdialog without buttons -- invalid body size & posit

    basicdialog without buttons -- invalid body size & posit


    I find that the body of the dialog is positioned and sized incorrectly when a button is not included in the dialog...

    fire bug shows that the x-dlg-dlg-body has the following settings:
    top: 10px I believe this is short 14px. (24px).
    height: 14px too big.

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    504
    Vote Rating
    0
    vtswingkid is on a distinguished road

      0  

    Default


    So,

    should i just try to override this with css?

    Or is this a bug that will be fixed?

    Or something all together different?

    Please advise.

    Thanks

  3. #3
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    You can provide a screenshot, a link or something to help figure out the problem?

  4. #4
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    504
    Vote Rating
    0
    vtswingkid is on a distinguished road

      0  

    Default


    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    	<head>
    		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    		<title>Untitled Document</title>
    	</head>
    	<body>
    		<link rel='stylesheet' type='text/css' href='ext/resources/css/ext-all.css' />
    		<script type='text/javascript' src='ext/yui-utilities.js'></script>
    		<script type='text/javascript' src='ext/ext-all.js'></script>
    		<script type='text/javascript' src='ext/ext-bridge-yui.js'></script>
    		<script type='text/javascript'>
    			Test = function(){
    				var legend;
    				return{
    					Init:function(){
    						Ext.get(document.body).createChild({id:'test', tag:'div'})
    						legend = new Ext.BasicDialog('test', {
    							width: 250,
    							height: 170,
    							closable:true,
    							resizable:false,
    							draggable:true
    						});
    						legend.header.dom.innerHTML="Legend";
    						var str="<table><tbody>";
    						str+="<tr><td class='imgBoxFaded'></td><td> - Status Unknown</td></tr>";
    						str+="<tr><td class='imgBoxGray'></td><td> - Status Normal</td></tr>";
    						str+="<tr><td class='imgBoxRed'></td><td> - Error Status</td></tr>";
    						str+="<tr><td class='imgBoxBlue'></td><td> - Update Required</td></tr>";
    						str+="<tr><td class='imgBoxGreen'></td><td> - Reset Required</td></tr>";
    						str+="<tr><td class='imgBoxYellow'></td><td> - Rescan Required</td></tr>";
    						str+="</tbody></table>";
    						legend.body.dom.innerHTML=str;
    						legend.show(document.body.getElementsByTagName('div')[0]);
    					}
    				}
    			}();
    			
    			Ext.onReady(Test.Init);
    		</script>
    	</body>
    </html>

  5. #5
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    504
    Vote Rating
    0
    vtswingkid is on a distinguished road

      0  

    Default


    Ok, I put up a sight with the script above...

    http://rwilliam.phpnet.us/test.html

  6. #6
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    You are overwriting the innerHTML and there is no way for the dialog to know that you have done it.

    Here's one config options that will help:

    syncHeightBeforeShow: true

    This causes it to automatically recalculate dimensions before being shown.

    Second:

    Code:
      
                         closable:true, 
                         resizable:false, 
                         draggable:true 
                      }); 
                      legend.header.dom.innerHTML="Legend";
    Can be:
    Code:
      closable:true, 
      resizable:false, 
      draggable:true,
      title: 'Legend'
    });
    This way it has a title on creation instead of empty (which causes the size to be off).

Similar Threads

  1. Invalid source HTML for this operation , Error In IE
    By JohnT in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 14 Jun 2010, 5:19 AM
  2. Invalid argument in Ext.util.CSS when creating CSS in IE6
    By dngrmoose in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 14 Apr 2009, 5:21 AM
  3. help!, grid error: invalid flag after regular expression
    By seldon in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 5 Mar 2007, 4:17 AM
  4. Do not set body.innerHTML='' if scripts are loaded in body
    By vtswingkid in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 19 Feb 2007, 12:51 PM
  5. overlay.body has no properties?
    By thejoker101 in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 26 Oct 2006, 7:50 AM

Thread Participants: 1