Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

input text box 1

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
Hello guys!

I have an input text box for an e-mail subscription list.

What i want: when the movie is loaded i want in the text box to have this text: "enter e-mail adress" and when the user clicks in the text box the cursor to appear.

How can i do this?
Any suggestion is appreciated. Regards,
Dragos.

dragos.jpg

 
Supposing you had an input textfield named my_input, just set your "Enter e-mail here..." text when creating the textfield itself, then use this something like this:

my_input.onSetFocus = function () {
my_input.text = "";
};

When the user clicks the field, it should clear the text and set the cursor blinking on the first character. Regards,

oldman3.gif
 
I have added this action on the 1st frame that contains the input texbox (variable = sub):

sub.onSetFocus = function() {
sub.text = "";
};

...but nothing happens...where am i doing wrong Oldnewbie? Regards,
Dragos.

dragos.jpg

 
Dragos,sub shouldn't be your variable's name but the textfield's instance name. Then it should work! Regards,

oldman3.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top