title: Table Outer Body only in HTML
body: <p>I want to display only table outer border when that option is clicked. The code is implemented using extjs and html. Border attribute has 2 values 1 and 0 which shows the borders or hides it. How can i implement it for outer borders.</p>
  
  <p>This is the function to generate table.</p>
  
  <pre><code>generateHtmlTable = function (cols, rows, border) {
  //Create Table
  var tdWidth = 100 / cols;
  var classN;
  //break-word only for IE
  //Set the classes for each type of table
  if(border==1){
      classN = "table1";
  } else {
      classN = "table0";
  }
  var tempborder = "box";
  var table = "&lt;table bgColor=white border='"+border+"' width='100%' style=\"table-layout:auto word-wrap: break-word;\" class=\"" + classN +"\" cellpadding=0 cellspacing=0&gt;";
  for (var i = 0; i&lt; parseInt(rows); i++) {
      table += "&lt;tr&gt;";
      for (var j = 0; j &lt; parseInt(cols); j++) {
          table += "&lt;td class=\"" + classN +"\" width='" + tdWidth +"%' valign=\"top\"&gt;&amp;nbsp;&lt;/td&gt;";
      }
      table += "&lt;/tr&gt;";
  }
  table += "&lt;/table&gt;";
  return table;
  </code></pre>
  
  <p>}</p>
  
  <p>This is the function to set borders.</p>
  
  <pre><code>setOutBorder: function(edt){
          var rng = edt.getDoc().getSelection().anchorNode;
          if (tables.validNode(rng)) {
              tables.init(edt);
              for(var i = 0; i &lt; tbody.childNodes.length; i++){
                  for(var j = 0; j &lt; tbody.childNodes[i].childNodes.length; j++){
                      tbody.childNodes[i].childNodes[j].className = "table0";
                  }
              }
              table.className = "tableOut";
              table.border = 0;
              //rng.select();
          }
          tables.refresh(edt);
      }
  </code></pre>