Results 1 to 2 of 2

Thread: Forms in Flash

  1. #1
    Join Date
    Jan 2007
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wink Forms in Flash

    There are easy workarounds for this and I'm leaning towards implementing one of those workarounds on my site...

    but just for my future knowledge I want to know how to do this.

    Ok, so I have a form on my site (which works great) in a limited amount of space. So to save space, I've put the field names inside the input text field (i.e. name, email, etc...).

    As of now, the viewer has to delete the text out of the input text field and enter in their own info. Is there a way that upon clicking inside the field that the text goes away?

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Untested.... but theoretically it should work. If it doesn't, post back and I will test some things out.

    Make your input text box. give it an instance name let's say the one for "name" so instance of "name" Then put your default text in your input box.

    then in the actions layer put this:

    Code:
    var clicked=false;
    name.onSetFocus=function(){
          if (!clicked){
                this.text="";
                clicked=true;
          }
    };
    Just redo for all fields, changing the name.onSetFocus=function(){ to email.onSetFocus, etc...
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •