# Can't erase once I hit submit

**URL:** https://forum.kirupa.com/t/cant-erase-once-i-hit-submit/56293
**Category:** Uncategorized
**Created:** [July 2, 2004, 10:24am UTC](https://forum.kirupa.com/t/cant-erase-once-i-hit-submit/56293 "2004-07-02T10:24:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Algreco](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Algreco](https://forum.kirupa.com/u/Algreco)
#### Post date: [July 2, 2004, 10:24am UTC](https://forum.kirupa.com/t/cant-erase-once-i-hit-submit/56293/1 "2004-07-02T10:24:12Z")

</div>

Hi everyone,  
This is my first post… kind of a silly question I guess, still gives me problems…

I’m Trying to make a very simple E mail form using textinput boxes and sending variables to php.  
Thing is that my erase button stops functioning once I hit the Submit button. Why is that??  
here are the scripts for Submit and Erase:

Submit script:  
on (release) {  
name = \_parent.mailer.name.text;  
company = \_parent.mailer.company.text;  
email = \_parent.mailer.email.text;  
telephone = \_parent.mailer.telephone.text;  
comments = \_parent.mailer.comments.text;  
// Check variable data  
if (name eq “”) {  
\_parent.mailer.gb\_status.text = “Required: Name”;  
} else if (email eq “”) {  
\_parent.mailer.gb\_status.text = “Required: e-mail Address”;  
} else if (telephone eq “”) {  
\_parent.mailer.gb\_status.text = “Required: Telephone number”;  
} else if (comments eq “”) {  
\_parent.mailer.gb\_status.text = “Required: Message”;  
} else {  
\_parent.mailer.gb\_status.text = “Thank you for your email…”;  
\_parent.mailer.name.text = “”;  
\_parent.mailer.company.text = “”;  
\_parent.mailer.email.text = “”;  
\_parent.mailer.telephone.text = “”;  
\_parent.mailer.comments.text = “”;  
}  
loadVariablesNum(“MailPHP.php”, “0”, “POST”);  
}

Erase goes like this:  
on(release){  
\_parent.mailer.name.text = “”;  
\_parent.mailer.company.text = “”;  
\_parent.mailer.email.text = “”;  
\_parent.mailer.telephone.text = “”;  
\_parent.mailer.comments.text = “”;  
\_parent.mailer.gb\_status.text = “”;  
}

Can anyone help? :huh:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 10, 2004, 6:45am UTC](https://forum.kirupa.com/t/cant-erase-once-i-hit-submit/56293/2 "2004-07-10T06:45:35Z")

</div>

## In flash, make a reset button, and put this in the actions for the reset button.

on (release) {  
name = “”;  
subject="";  
message="";  
email="";  
}

* * *

P.S. Dont put the lines in! 🙂  
Explanation:

name is the “var” that you gave any given text field.

Now Finally, I HAVE HELPED OTHERS…I Wish someone could help me put a preloader on JPEG Images I am calling from an xml sheet! [link here](http://www.kirupaforum.com/forums/showthread.php?t=61208&highlight=xml+challenge)
