# Problem with For Loop

**URL:** <https://forum.kirupa.com/t/problem-with-for-loop/108493>\
**Category:** Uncategorized\
**Created:** [April 26, 2004, 6:24am UTC](https://forum.kirupa.com/t/problem-with-for-loop/108493 "2004-04-26T06:24:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashishchandras](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ashishchandras](https://forum.kirupa.com/u/ashishchandras)\
**Post date:** [April 26, 2004, 6:24am UTC](https://forum.kirupa.com/t/problem-with-for-loop/108493/1 "2004-04-26T06:24:52Z")

</div>

Hi,

I want to create text fields in tabular format.(in rows and columns).  
Follwing is the script which should create 3 columns and 5 rows but its just displays one row only ??? Where am I making the mistake exactly. Can anyone HELP me ??

xp=20;  
yp=10;  
twidth=250;  
theight=120;  
for(j=0; j\<5; j++){  
for(i=0; i\<3; i++){  
this.createTextField(“column”+i, i+10, xp, yp, twidth, theight);  
this[“column”+i].border=true;  
xp+=this[“column”+i].\_width+26;  
trace(xp + " " + yp)  
}  
yp+=35;  
xp=20;  
}

Thanx in adv,  
Ashish
