<!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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>var offersNumRows = 2</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>var offersNumRowsAdded=4 (f.e.)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;for(o=0;o&lt;offersNumRowsAdded;o++)<BR>&nbsp;{&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2><BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;var numRow = 
offersNumRows + o;</FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;var inputProductsDescription = 
document.createElement("textarea");<BR>&nbsp;&nbsp;inputProductsDescription.setAttribute("name","offers_products[" 
+ numRow + 
"][products_description]");<BR>&nbsp;&nbsp;inputProductsDescription.setAttribute("id","offers_products[" 
+ numRow + 
"][products_description]");&nbsp;&nbsp;<BR>&nbsp;&nbsp;inputProductsDescription.setAttribute("cols",25);<BR>&nbsp;&nbsp;inputProductsDescription.setAttribute("rows",3);&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; HERE COMES THE TROUBLE 
MAKER:</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;inputProductsDescription.onfocus=function() { 
products_price_return(numRow); };&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>=&gt; NUMROW FINALLY IS 6</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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&nbsp;for the&nbsp;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&nbsp;2nd created textarea.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</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>