Add check boxes to form panel : CheckBox « Ext JS « JavaScript DHTML






Add check boxes to form panel

  

<html>
<head>
<title>Hello World Window</title>
<link rel="stylesheet" type="text/css" href="ext-3.0.0/resources/css/ext-all.css" />
<script type="text/javascript" src="ext-3.0.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-3.0.0/ext-all.js"></script>

</head>
<body>
<script type="text/javascript">
Ext.onReady(function() {
    Ext.QuickTips.init();
    
    var checkboxes = [
      {
        xtype      : 'checkbox',
        fieldLabel : "",
        boxLabel   : 'A',
        inputValue : 'a'
      },
      {
        xtype          : 'checkbox',
        fieldLabel     : "",
        labelSeparator : ' ',
        boxLabel       : 'B',
        inputValue     : 'b'
      },
      {
        xtype          : 'checkbox',
        fieldLabel     : "",
        labelSeparator : ' ',
        boxLabel       : 'C',
        inputValue     : 'c'
      },
      {
        xtype          : 'checkbox',
        fieldLabel     : "",
        labelSeparator : ' ',
        boxLabel       : 'D',
        inputValue     : 'd'
      }
    ]
    
    var fp = {
      xtype      : 'form',
      labelWidth : 110,
      items      : checkboxes,
      frame      : true
    }
        
    new Ext.Window({
      title   : '',
      layout  : 'fit',
      height  : 180,
      width   : 320,
      borde   : false,
      items   : fp
    }).show();
});
</script> 
<div id='div1'>asdf</div>
</body>
</html>

   
    
  








Related examples in the same category

1.Use checkbox group to hold the check boxes
2.Add checkbox to FormPanel
3.CheckBox cell editor