<!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> </FONT></SPAN></FONT></DIV>
<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><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> mycurrent_cell=document.createElement("TD");</FONT></DIV>
<DIV> </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);<BR> <BR> mycurrent_cell.appendChild(mySelect);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff
size=2> document.getElementById('trProducts').appendChild(mycurrent_cell);
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff
size=2> //----------------------------------------------------------------------<BR> //
works fine,
but...<BR> //----------------------------------------------------------------------<BR> <BR> mycurrent_row=document.createElement("TR");<BR>
<BR> mycurrent_cell=document.createElement("TD");</FONT></DIV>
<DIV> </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> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff
size=2> mycurrent_cell.appendChild(mySelect);
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff
size=2> mycurrent_row.appendChild(mycurrent_cell) ;
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff
size=2> document.getElementById('tableProducts').appendChild(mycurrent_row);
<BR> <BR> //----------------------------------------------------------------------<BR> //
won't
work:(<BR> //---------------------------------------------------------------------- <BR>
} // for <BR>}</FONT></DIV></SPAN></FONT></BODY></HTML>