# Function for createTextField?

**URL:** https://forum.kirupa.com/t/function-for-createtextfield/125767
**Category:** Uncategorized
**Created:** [October 17, 2004, 1:12pm UTC](https://forum.kirupa.com/t/function-for-createtextfield/125767 "2004-10-17T13:12:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Frank](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@Frank](https://forum.kirupa.com/u/Frank)
#### Post date: [October 17, 2004, 1:12pm UTC](https://forum.kirupa.com/t/function-for-createtextfield/125767/1 "2004-10-17T13:12:10Z")

</div>

Hello again,

I’m trying to write a function that I can use for creating text fields - in this case: to make the labels for a navigation menu. But the function is not working and I don’t know what’s the problem. Vars are: n = name and l = depth. Can someone help me out? 😉

```auto
function makeMenuTab(n, l, x, y, w, h) {
   var c = createTextField("c"+j, j++);
   c._x = x;
   c._y = y;
   c.text = n;
   c.setTextFormat(menu_format);
   return c;
   }
   images = makeMenuTab(test, 1, 100, 400, 100, 100);
   

```
