<!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.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>i dynamically create a textarea in a for() like
this:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>var offersNumRows = 2</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>var offersNumRowsAdded=4 (f.e.)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2> for(o=0;o<offersNumRowsAdded;o++)<BR> { </FONT></DIV>
<DIV><FONT face=Arial size=2><BR> var numRow =
offersNumRows + o;</FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> var inputProductsDescription =
document.createElement("textarea");<BR> inputProductsDescription.setAttribute("name","offers_products["
+ numRow +
"][products_description]");<BR> inputProductsDescription.setAttribute("id","offers_products["
+ numRow +
"][products_description]"); <BR> inputProductsDescription.setAttribute("cols",25);<BR> inputProductsDescription.setAttribute("rows",3); </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> HERE COMES THE TROUBLE
MAKER:</FONT></DIV>
<DIV><FONT face=Arial
size=2> inputProductsDescription.onfocus=function() {
products_price_return(numRow); }; </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>=> NUMROW FINALLY IS 6</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>the for() and the rest of the script works
well.</FONT></DIV>
<DIV><FONT face=Arial size=2>now when i call the on focus function for let's
say for the 2nd created textarea</FONT></DIV>
<DIV><FONT face=Arial size=2>the numRow value for the products_price_return()
function</FONT></DIV>
<DIV><FONT face=Arial size=2>always receives the nighest value of numRow from
after the loop, in this case 6,</FONT></DIV>
<DIV><FONT face=Arial size=2>but not of the value it had when i created the
element which should have been 2 in the 2nd created textarea.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>how can i achieve my goal,</FONT></DIV>
<DIV><FONT face=Arial size=2>does anybody understand?</FONT></DIV></BODY></HTML>