Input textbox not working

This is driving me crazy. I have an input text box. Instance name = pwd/var name = pwd.

I am trying to output what the user types into it with the code:

trace(pwd.text);

on release of a submit button.

I get “undefined” for the output. I am in scope and the box is a password input box with maximum chars of 15. I sthere a setting I am missin g?

Don’t give it a variable name that’s the same as your instance name. You won’t need the variable anyway, as pwd.text is what you are tracing and would have the same content as your field variable.