Object.innerHTML not setting value
<p>I am using object.innertHTML to set an HTML structure. But its not setting initial TR and TD elements.. Below is the code</p>

<pre><code> var previousInnerHTML = new String();
 previousInnerHTML = previousInnerHTML.concat("&lt;TR class='evenrow ' __eventAdded='true' isSubTotalRow='false' usable='false' index='40'&gt;&lt;TD&gt;&lt;INPUT id=check_table1 onclick=WebForm.markRowForSelection(event) type=checkbox xformstype='checkbox' doEBIValidate='false' __cID='c514' transactional='true' model='null' freemodel='false' databound='true' freeform='false' _initialized='true' originalTitle dataBoundElement='true' selectnotifier='true' trueValue='null' falseValue='null'&gt;&lt;/INPUT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV id=xfe2 class=fieldsbox&gt;&lt;INPUT id=output2 class=input title='Provide value for Output2' type=text xformstype='input' doEBIValidate='false' __parent='table1' __cID='c515' transactional='true' model='null' freemodel='false' databound='true' freeform='false' _initialized='true' originalTitle='Provide value for Output2' xql='.//ID' ref='.//ID' _inTable='true' dataBoundElement='true'&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV id=xfe4 class=fieldsbox&gt;&lt;INPUT id=output4 class='input output' title='Value for Output4' readOnly xformstype='output' doEBIValidate='false' __parent='table1' __cID='c516' transactional='true' model='null' freemodel='false' databound='true' freeform='false' _initialized='true' originalTitle='Value for Output4' xql='EMPID' isOutputControl='true' ref='EMPID' _inTable='true' dataBoundElement='true'&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV id=xfe6 class=fieldsbox&gt;&lt;INPUT id=output5 class='input output' title='Value for Output5' readOnly xformstype='output' doEBIValidate='false' __parent='table1' __cID='c517' transactional='true' model='null' freemodel='false' databound='true' freeform='false' _initialized='true' originalTitle='Value for Output5' xql='ROLEID' isOutputControl='true' ref='ROLEID' _inTable='true' dataBoundElement='true'&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV id=xfe8 class=fieldsbox&gt;&lt;INPUT id=output3 class='input output' title='Value for Output3' readOnly xformstype='output' doEBIValidate='false' __parent='table1' __cID='c518' transactional='true' model='null' freemodel='false' databound='true' freeform='false' _initialized='true' originalTitle='Value for Output3' xql='num1' isOutputControl='true' ref='num1' _inTable='true' dataBoundElement='true'&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV id=xfe10 class=fieldsbox&gt;&lt;INPUT id=output1 class='input output' title='Value for Output1' readOnly xformstype='output' doEBIValidate='false' __parent='table1' __cID='c519' transactional='true' model='null' freemodel='false' databound='true' freeform='false' _initialized='true' originalTitle='Value for Output1' xql='num2' isOutputControl='true' ref='num2' _inTable='true' dataBoundElement='true'&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;");

 var buttonObject = document.createElement("");
 buttonObject.innerHTML = previousInnerHTML;
</code></pre>

<p>But output getting is</p>

<pre><code>"&lt;INPUT id=check_table1 onclick=WebForm.markRowForSelection(event) type=checkbox xformstype="checkbox" doEBIValidate="false" __cID="c514" transactional="true" model="null" freemodel="false" databound="true" freeform="false" _initialized="true" originalTitle dataBoundElement="true" selectnotifier="true" trueValue="null" falseValue="null"&gt;&lt;/INPUT&gt;&lt;/TD&gt;&lt;TD&gt;
&lt;DIV id=xfe2 class=fieldsbox&gt;&lt;INPUT id=output2 class=input title="Provide value for Output2" type=text xformstype="input" doEBIValidate="false" __parent="table1" __cID="c515" transactional="true" model="null" freemodel="false" databound="true" freeform="false" _initialized="true" originalTitle="Provide value for Output2" xql=".//ID" ref=".//ID" _inTable="true" dataBoundElement="true"&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;
&lt;DIV id=xfe4 class=fieldsbox&gt;&lt;INPUT id=output4 class="input output" title="Value for Output4" readOnly xformstype="output" doEBIValidate="false" __parent="table1" __cID="c516" transactional="true" model="null" freemodel="false" databound="true" freeform="false" _initialized="true" originalTitle="Value for Output4" xql="EMPID" isOutputControl="true" ref="EMPID" _inTable="true" dataBoundElement="true"&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;
&lt;DIV id=xfe6 class=fieldsbox&gt;&lt;INPUT id=output5 class="input output" title="Value for Output5" readOnly xformstype="output" doEBIValidate="false" __parent="table1" __cID="c517" transactional="true" model="null" freemodel="false" databound="true" freeform="false" _initialized="true" originalTitle="Value for Output5" xql="ROLEID" isOutputControl="true" ref="ROLEID" _inTable="true" dataBoundElement="true"&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;
&lt;DIV id=xfe8 class=fieldsbox&gt;&lt;INPUT id=output3 class="input output" title="Value for Output3" readOnly xformstype="output" doEBIValidate="false" __parent="table1" __cID="c518" transactional="true" model="null" freemodel="false" databound="true" freeform="false" _initialized="true" originalTitle="Value for Output3" xql="num1" isOutputControl="true" ref="num1" _inTable="true" dataBoundElement="true"&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;
&lt;DIV id=xfe10 class=fieldsbox&gt;&lt;INPUT id=output1 class="input output" title="Value for Output1" readOnly xformstype="output" doEBIValidate="false" __parent="table1" __cID="c519" transactional="true" model="null" freemodel="false" databound="true" freeform="false" _initialized="true" originalTitle="Value for Output1" xql="num2" isOutputControl="true" ref="num2" _inTable="true" dataBoundElement="true"&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;"
</code></pre>

<p>intial TR and TD element are mising. What could be the reason</p>
