Hello!
I have an InputText field for users to submit information to me. I want to have the text field display some default text (Ex. Type E-Mail Here) and then when the field is clicked, the text will be cleared.
After a long time of searching a found a solution that works perfectly…using ActionScript 2.0. Unfortunately my site is in 3.0 therefore I cannot use this code.
For the example I want my default text to be “Type E-Mail Here”, and the InputText Instance Name will be “inputTxt”
Here is the 2.0 code:
inputTxt.textField = "Type E-Mail Here..."
inputTxt.onSetFocus = function() {
inputTxt.textField = ""
};
inputTxt.onKillFocus = function() {
inputTxt.textField = "Type E-Mail Here..."
};
When using this code in AS3, I get the error code “1120: Access of undefined property inputTxt”. What do I need to make this code work in AS3?
Thanks a million in advance.
- Mangoes