2 Replies Latest reply on May 25, 2006 1:47 PM by Newsgroup_User

    submit button for email...how does this work?

    MightyHokie Level 1
      I have a set of input text boxes that goes with a box that, when filled out and 'submit' is hit, should open the users email and have the content in their mail program, ready to send.
      There are two buttons actually. There is the 'reset' button and the 'submit' button. Here is the code for the 'reset' button. It works fine:

      on(release) {
      t2_2="";
      t3_2="";
      t4_2="";
      t5_2="";
      t6_2="";

      }

      t2 through t6 are the variable names for the text boxes.

      What code would I need to put on the 'submit' button to make it work?

      Thanks.
      Van
        • 1. Re: submit button for email...how does this work?
          Level 7
          Van,

          > I have a set of input text boxes that goes with a box that,
          > when filled out and 'submit' is hit, should open the users
          > email and have the content in their mail program, ready to
          > send.

          The only connection Flash has with a user's email program is the mailto:
          protocol, as used with the getURL() function. A SWF file can't really *do*
          anything to an email program, but it is possible to pass information to the
          user's email software via a query string. Note: it is assumed here that
          the user even *has* a default email program defined. People who use public
          computers at a library, for example, may not -- this isn't going to open a
          new browser with HotMail, Gmail, etc., ready and waiting.

          Note the procedure here ...

          ftp://ftp.isi.edu/in-notes/rfc2368.txt

          ... and use it in conjunction with getURL().

          on (release) {
          getURL("mailto:user@domain.com?parametersHere");
          }


          David
          stiller (at) quip (dot) net
          Dev essays: http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: submit button for email...how does this work?
            Level 7
            To clarify ... you'll have to build the parameters yourself, using the
            variables associated with your text fields. One way to do that might be
            like this ...

            var output:String = t2_2 + t3_2 + t4_2;
            on (release) {
            getURL("mailto:user@domain.com?body=" + output);
            }


            David
            stiller (at) quip (dot) net
            Dev essays: http://www.quip.net/blog/
            "Luck is the residue of good design."