Skip to main content
August 1, 2007
Question

selection tag on input fields

  • August 1, 2007
  • 1 reply
  • 297 views
I created a contact form that has the box labels placed as the initial text in the input field. I have used the selection.setFocus. Is there actionscript in the selection class that will make the initial text in the input field initial text dissapear when the user clicks on the field or tabs to it?
This topic has been closed for replies.

1 reply

Inspiring
August 1, 2007
Are you looking for something like this (AS 3.0)?

Damon Edwards
Inspiring
August 1, 2007
you must be using the TextInput component to use the focusIn event. Here is sample for AS2, don't know if CS3 has TextInput component, and I dont believe AS3 has setFocus method, so I'm guessing you're using AS2 anyway.
August 4, 2007
Alright, I finally have had a chance to try this with no luck. Would having the form fields within a movie clip have anything to do with it? I have attached the AS that I have placed in the first frame of the movie clip "bachelor"