<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff><A href="http://michaelborchers.net/js/dom2.php"><FONT 
face="Trebuchet MS" 
size=2>http://michaelborchers.net/js/dom2.php</FONT></A><SPAN 
class=372324309-28092005><FONT face="Trebuchet MS" 
size=2>&nbsp;</FONT></SPAN></FONT></DIV>
<DIV><FONT color=#0000ff><SPAN 
class=372324309-28092005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff><SPAN class=372324309-28092005><FONT 
face="Trebuchet MS" size=2>so far so good, adding a&nbsp;single cell in a row 
with an id&nbsp;works fine,</FONT></SPAN></FONT></DIV>
<DIV><FONT color=#0000ff><SPAN class=372324309-28092005><FONT 
face="Trebuchet MS" size=2>but i can't add a complete 
row.</FONT></SPAN></FONT></DIV>
<DIV><FONT color=#0000ff><SPAN 
class=372324309-28092005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=372324309-28092005>please see the script which was supposed to do 
both,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=372324309-28092005>what's wrong?</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN 
class=372324309-28092005></SPAN></FONT>&nbsp;</DIV><FONT><SPAN 
class=372324309-28092005>
<DIV><BR><FONT face="Trebuchet MS" color=#0000ff size=2>function 
addOrdersNumRows()<BR>{<BR>&nbsp;var ordersNumRowsAdded = 
document.getElementById("orders_num_rows_added").value;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;for(o=0;o&lt;ordersNumRowsAdded;o++)<BR>&nbsp;{<BR>&nbsp;&nbsp;mycurrent_cell=document.createElement("TD");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2>&nbsp;&nbsp;mySelect = 
document.createElement("select");<BR>&nbsp;&nbsp;mySelect.setAttribute("name","products_id[1][products_id]");<BR>&nbsp;&nbsp;theOption=document.createElement("OPTION");<BR>&nbsp;&nbsp;theText=document.createTextNode("Produkte");<BR>&nbsp;&nbsp;theOption.appendChild(theText);<BR>&nbsp;&nbsp;theOption.setAttribute("value","1");<BR>&nbsp;&nbsp;mySelect.appendChild(theOption);<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;mycurrent_cell.appendChild(mySelect);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;document.getElementById('trProducts').appendChild(mycurrent_cell); 
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;//----------------------------------------------------------------------<BR>&nbsp;&nbsp;// 
works fine, 
but...<BR>&nbsp;&nbsp;//----------------------------------------------------------------------<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;mycurrent_row=document.createElement("TR");<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;mycurrent_cell=document.createElement("TD");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2>&nbsp;&nbsp;mySelect = 
document.createElement("select");<BR>&nbsp;&nbsp;mySelect.setAttribute("name","products_id[1][products_id]");<BR>&nbsp;&nbsp;theOption=document.createElement("OPTION");<BR>&nbsp;&nbsp;theText=document.createTextNode("Produkte");<BR>&nbsp;&nbsp;theOption.appendChild(theText);<BR>&nbsp;&nbsp;theOption.setAttribute("value","1");<BR>&nbsp;&nbsp;mySelect.appendChild(theOption);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;mycurrent_cell.appendChild(mySelect);&nbsp;&nbsp;&nbsp;&nbsp; 
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;mycurrent_row.appendChild(mycurrent_cell) ;&nbsp; 
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff 
size=2>&nbsp;&nbsp;document.getElementById('tableProducts').appendChild(mycurrent_row); 
<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//----------------------------------------------------------------------<BR>&nbsp;&nbsp;// 
won't 
work:(<BR>&nbsp;&nbsp;//----------------------------------------------------------------------&nbsp;&nbsp;<BR>&nbsp; 
} // for&nbsp;&nbsp;&nbsp;&nbsp; <BR>}</FONT></DIV></SPAN></FONT></BODY></HTML>