# E-Mail Form, on send problem

**URL:** <https://forum.kirupa.com/t/e-mail-form-on-send-problem/259737>\
**Category:** flash\
**Created:** [May 8, 2008, 9:22am UTC](https://forum.kirupa.com/t/e-mail-form-on-send-problem/259737 "2008-05-08T09:22:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaggieBroon](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@MaggieBroon](https://forum.kirupa.com/u/MaggieBroon)\
**Post date:** [May 8, 2008, 9:22am UTC](https://forum.kirupa.com/t/e-mail-form-on-send-problem/259737/1 "2008-05-08T09:22:15Z")

</div>

Hi guys…

I’ve downloaded a flash email form and am using it for a site Im making. Its fine and works a treat but I want the form to disappear when its sent. I’ve posted the code below the line that I put in is **this.form.\_visible=false;** but it doesnt seem to want to work. Any ideas what Im doing wrong? I also tried putting a gotoAndPlay action in there and nothing! Any ideas?

```auto
function sendEmail(n, c, t, e, m) {
   session = "?nocache=" + random(999999);
   contact_lv = new LoadVars();
   contact_lv.name = n;
   contact_lv.company = c;
   contact_lv.tel = t;
   contact_lv.email = e;   
   contact_lv.message = m;
   contact_lv.key = "email";
   trace(n + " - " + c + " - "+ t + " - "+ e + " - " + m);
   contact_lv.sendAndLoad(contact_php_file + session, contact_lv, "POST");
   contact_lv.onLoad = function(success) {
      if(!success) {
         return trace("Error calling PHP File!");
      } else {
                        this.form._visible=false;
         return trace("Email Sent!");
         }
   }
}

```
