<!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 face=Tahoma><SPAN class=960015710-28092005></SPAN><FONT
size=2>><SPAN class=960015710-28092005><FONT face="Trebuchet MS"
color=#0000ff> >></FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN
class=960015710-28092005></SPAN></FONT></FONT><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> </FONT></SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT color=#0000ff><SPAN
class=372324309-28092005></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff><SPAN class=372324309-28092005><FONT
face="Trebuchet MS" size=2>so far so good, adding a single cell in a row
with an id 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> </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> </DIV><FONT size=+0><SPAN
class=372324309-28092005>
<DIV><BR><FONT face="Trebuchet MS" color=#0000ff size=2>function
addOrdersNumRows()<BR>{<BR> var ordersNumRowsAdded =
document.getElementById("orders_num_rows_added").value;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff
size=2> for(o=0;o<ordersNumRowsAdded;o++)<BR> {<BR> </FONT><FONT
face="Trebuchet MS" color=#0000ff
size=2> mycurrent_row=document.createElement("TR");<BR>
<BR> mycurrent_cell=document.createElement("TD");</FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2> mySelect =
document.createElement("select");<BR> mySelect.setAttribute("name","products_id[1][products_id]");<BR> theOption=document.createElement("OPTION");<BR> theText=document.createTextNode("Produkte");<BR> theOption.appendChild(theText);<BR> theOption.setAttribute("value","1");<BR> mySelect.appendChild(theOption);</FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff
size=2> mycurrent_cell.appendChild(mySelect);
</FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff
size=2> mycurrent_row.appendChild(mycurrent_cell) ;
</FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT
size=2> var tbody =
document.getElementById("tableProducts").tBodies[0];<BR> }
// for <BR>}<SPAN
class=960015710-28092005> </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=960015710-28092005><<<<</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=960015710-28092005></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=960015710-28092005></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=960015710-28092005></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=960015710-28092005>found the solution: you HAVE to use the tbody
tag:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=960015710-28092005>var tbody =
document.getElementById("tableProducts").tBodies[0];</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=960015710-28092005></SPAN></FONT></FONT></FONT><FONT
face="Trebuchet MS"><FONT color=#0000ff><FONT size=2><SPAN
class=960015710-28092005> </SPAN></FONT></FONT></FONT></DIV></BLOCKQUOTE></SPAN></FONT></BODY></HTML>