<!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
style="WORD-WRAP: break-word; khtml-nbsp-mode: space; khtml-line-break: after-white-space">
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>i am creating new elements within
for()</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>with a starting var named "id"</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005> id = ordersNumRows;</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005> for(o=0;o<ordersNumRowsAdded;o++)<BR> {</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>...</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005> inputProductsPrice.setAttribute("id","products_id["
+ id + "][products_price]");</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005> inputProductsPrice.onfocus=function() {
products_price_return(id); };</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>...</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>id++;</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>}</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>the shown ID in the attribute works fine => 0, 1, 2,
... X (let's say 10)</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>but when the function is called, the id always is the
highest value at the end of for, f.e. 10</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005>how do these globals work, do i have to add them with a
" + " or similar?</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=804061614-28092005></SPAN></FONT> </DIV></BODY></HTML>