1 Reply Latest reply on Mar 14, 2007 4:08 PM by kglad

    problem with loadVars loadAndSend method

    fourinchesofego
      Hi...

      I am having a small problem...

      I am using the following code to send the text generated in a dynamic text box to myself in an email:

      this.submit_btn.onRelease = function() {
      var emailResponse:LoadVars = new LoadVars();
      emailResponse.onLoad = function(success:Boolean) {
      if (success) {
      debug_txt.text = "your poem has been submitted";
      } else {
      debug_txt.text = "there has been an error";
      }
      };
      var email:LoadVars = new LoadVars();
      email.recipient = "contact@fourinchesofego.com";
      email.subject = "new_ann_coulter_poem";
      email.themessage = poem_txt.text;
      email.sendAndLoad(" http://www.fourinchesofego.com/cgi-sys/formmail.pl", emailResponse, "POST");
      };

      The form handler is the generic handler my server provided. the email gets there just fine; the problem is that the value of themessage that comes through is "undefined". When I set the value of email.themessage to a string, that string comes through, but I do not seem to be able to pass the text from the dynamic text area, or any variable in fact.

      Thus, my question is what am I doing wrong? I am sure I should see it, but, alas, I do not.

      Any help would be greatly appreciated.

      -me

      p.s.you can see the prototype at www.fourinchesofego.com/ann.html

      the little yellow box is the submit button.

      thanks