dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Getting rid of text in text boxes

  1. #1
    Senior Member
    Join Date
    Jun 2000
    Posts
    284

    Getting rid of text in text boxes

    Heh.. weird question. For some reason, my contact form is displaying weird text in the input boxes. Like for the textbox that takes the user's name, it says "_level0.form.name". Same with the other 2 text boxes, "_level0.form.email" for email, and "_level0.form.message" for the message.

    So I have a question: which actions do I use to clear those text boxes at the start of the movie clip? Kind of like "on load, clear form.name.text". If anyone knows why this text is coming up and I can fix it that way, that'd be cool too.

    Here's the site: www.phunctional.com just click on "contacts" and you'll see what I'm talking about. Thanks

  2. #2
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    you usually get that if you assign a movieclip to a text box, like this:
    myTextBox.text = myMovieClip,

    show me how you are assigning the value of the textboxes,

    zlatan
    New sig soon

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Posts
    284
    I have the 3 text boxes inside of the movie clip "form". I don't believe I'm assigning any values. How do I check if values are assigned, or where would that take place if I did that?

  4. #4
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    have you just put the textboxes in the movie and left them? what instance names have you given them,
    posting a sample of the code you have used would help me help you,
    New sig soon

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Posts
    284
    Here's the format:

    movie clip (form)
    |_ input text (instance: name var: name)
    |_ input text (instance: email var: email)
    |_ input text (instance: message var: message)

    reset button code:
    on (release) {
    form.name = "";
    form.email = "";
    form.message = "";
    }

    submit button code:
    on (release) {
    if (form.name eq "" or form.email eq "" or form.message eq "") {
    stop ();
    } else {
    loadVariablesNum ("form.php", 0, "POST");
    thankyou._alpha = 100;
    }
    }

    note: the reset button code works, as does the submit.

  6. #6
    Senior Member
    Join Date
    Jun 2000
    Posts
    284
    ahhh i figured it out.. i don't know the reasoning, but the instance name can't equal the variable name. the wheels started turning once you asked me about the instance name, so i guess that was why it was doing that.

    thanks

  7. #7
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    lol, no worries
    New sig soon

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center