1 2 3 Previous Next 95 Replies Latest reply on Nov 29, 2007 2:01 AM by The Feldkircher

    Attn: David Stiller

    Mary_Alice Level 1
      Keith Glad suggested that I send a link to the form file and have done so but have not heard anything yet regarding such. Just emailed Chris Beech with the url.

      http://www.ecowaterpb.com/fla%2c%20php.zip

      Stuff I need help on: Thank you page should open and it does not now. The typed information should come to email and it does not only the word undefined next to titles. The title household does not show in the email.

      Here is what is showing in email:

      water supply: undefined
      softener: undefined
      bottled water: undefined
      comments: undefined
      name/business: undefined
      street: undefined
      city, state, zip: undefined
      phone: undefinedemail: undefined

      From: <undefined>
      Reply-To: undefined
      Return-Path: undefined


        • 1. Re: David Stiller
          Level 7
          Mary Alice,

          > Stuff I need help on: Thank you page should open and it
          > does not now. The typed information should come to
          > email and it does not only the word undefined next to titles.
          > The title household does not show in the email.

          There are always two points for failure, at least, for Flash-based email
          form handlers. In no particular order: a) something might be going wrong
          with the SWF and/or b) something might be going wrong with the server-side
          code (PHP, in this case).

          The PHP portion of your sample files seems all right to me at first
          glance. You'll know for sure, though, if you write up a quick HTML-based
          form and submit to that same PHP page. Just use the same field names as the
          ones in your FLA (household, water supply, softener, etc.). That's the
          beauty of forms in Flash: if it works in HTML, you already have half your
          problem fixed. Assuming your PHP script is fine -- though you should verify
          on your end -- that leaves us with the Flash content.

          I checked out your FLA and saw quite a few areas of concern. For one,
          consider how the form fields in your movie are set up. They're all input
          text fields (which is good; they should be), and these text fields are
          inside a movie clip. That movie clip is on the main timeline. None of the
          text fields has an instance name, and neither does the movie clip. Also in
          the main timeline, there is a Submit button with code attached directly do
          it, via an on() event handler.

          Inside that on() code, we have a LoadVars instance. LoadVars works like
          this: a) you create an instance, b) you create properties for that
          instance, and c) you submit the contents of that instance.

          In your code, the first point is done.

          my_lv = new LoadVars();

          Now for part b) ...

          my_lv.household = _parent.household_txt.text;
          my_lv.water = _parent.water_txt.text;
          my_lv.soft = _parent.soft_txt.text;
          // etc.

          So far, so good -- but only conceptually. You're correctly adding a
          "household" property to your LoadVars instance (and a "water" property, and
          so on). The problem here is the path on the right side of the equals sign.
          Imagine things from the point of fiew of this button. Let's take the first
          one, just for example.

          Button symbols, in ActionScript 2.0, are derived from the Button class.
          (Classes define all objects, and you'll find properties, methods, and/or
          events described, so you'll know what characteristics each object has, what
          it can do, and what it can react to.) The Button class does define a
          _parent property, so the "_parent" portion of that first expression,
          "_parent.household_txt.text", is valid in principle. In this particular
          arrangemetn, however, it's not useful.

          There are at least two ways to handle button events in AS2. You're
          using a relatively old approach (practically "ancient," in Internet years).
          When the on() approach is used, buttons don't look to themselves for "who
          they are." The keyword "this", for example, when traced from a button using
          on(), refers to the timeline in which that button sits. In this case, that
          parent is the main timeline itself. So it's the main timeline -- in this
          context -- that is being asked to look for its parent. The main timeline
          has no parent, so right from the get-go, this expression has already hit an
          "undefined" snag.

          If you use the more modern (as of Flash MX) approach to AS2 event
          handling, discussed here ...

          http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent

          ... the keyword "this" refers to the button itself. In which case
          this._parent (or just _parent, as you have it) would refer to the main
          timeline rather -- because this button is *in* that timeline -- rathern than
          the main timeline's non-existant parent. That might work, too, assuming
          that the main timeline had a number of objects in it with the instance names
          household_txt, water_txt, soft_txt, and the like. For example, if your
          input text fields had instance names (but they don't), ActionScript would be
          able to see each by name.

          Because they're text fields, they would have the "text" property defined
          by the TextField class. That's why an expression like household_txt.text
          might work ... because a TextField instance (i.e. an input text field) has
          the instance name household_txt and also a text property.

          In your case, all those text fields are inside a movie clip. That would
          be fine, too, but you'd have to give that movie clip an instance name in
          order to be able to path to the text fields. If the movie clip's instance
          name was textFieldHolder, it might go like this:

          _parent.textFieldHolder.household_txt.text

          Does that start to make sense? In your movie, the LoadVars instance's
          properties need to be connected to their corresponding intput text fields,
          and the connection depends on instance names.

          One last obstacle I can see is that, instead of instance names, you're
          using the very old technique of associating a timeline variable with a text
          field (using the Var field of the Property inspector). Technically
          speaking, that's fine too, but you have to understand that the Var approach
          was used before it was possible to give text fields instance names -- aeons
          ago, in terms of Flash. You'll either need to clear out all those Var
          fields for each text field and give each text field an instance name, or you
          can forget about the instance names and, instead, route your object path to
          the timeline of the movie clip that contains these text fields -- because
          that's where these variables will go. Which means that, in any case, that
          container movie clip needs an instance name.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Attn: David Stiller
            Damon Edwards Level 3
            did you see This
            • 3. Re: David Stiller
              Mary_Alice Level 1
              I am looking over your message now. Be back in touch.
              • 4. Re: Attn: David Stiller
                Level 7
                dzedward,

                > did you see
                > http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1316018&enterthread=y

                That's one thing that concerns me about this particular post. There's
                been lots of helpful input already, but it's spread around among the OP's
                various threads.


                David Stiller
                Adobe Community Expert
                Dev blog, http://www.quip.net/blog/
                "Luck is the residue of good design."


                • 5. Re: Attn: David Stiller
                  Damon Edwards Level 3
                  Yea, I replied to her yesterday, and i'm sure i fixed the problem. I don't get why people don't go back to their original thread and stick with it.

                  On a side note, I'm going to email you about something.
                  • 6. Re: Attn: David Stiller
                    clbeech Level 3
                    Agreed, she'd began posting a while back even, like a couple of months ago.

                    And WOW!! David, holy cow what an explaination, my fingures get sore just reading it! writer? lol!!
                    • 7. Re: Attn: David Stiller
                      Level 7
                      clbeech,

                      > And WOW!! David, holy cow what an explaination, my
                      > fingures get sore just reading it! writer? lol!!

                      Heh, I do tend to gab. ;) I write tutorials for the subscription site
                      CommunityMX.com, have a couple articles in the Adobe Dev Center, and
                      co-authored "Foundation Flash CS3 for Designers" (friends of ED) with Tom
                      Green earlier this year. I also wrote the interactivity chapter for Chris
                      Georgenes's "How to Cheat in Adobe Flash CS3" (Focal Press), which was a
                      cool gig, because Chris is such a cool guy and his artwork kicks butt.


                      David Stiller
                      Adobe Community Expert
                      Dev blog, http://www.quip.net/blog/
                      "Luck is the residue of good design."


                      • 8. Re: Attn: David Stiller
                        Mary_Alice Level 1
                        ...through the woods I go...very cutesy. I began the web project sometime in August and was through with everything except the form. Ah the form! Form situation began early October. You guys know more than me about Actionscript and PHP. Let's solve in asap.

                        I repaired some of the scripting and now the Thank you page appears! but still nothing in email other than defined. I really need to solve this!

                        I am not sure if that script is in the url:


                        See the revised scripting.

                        FORM script:

                        onClipEvent(data) {
                        _root.nextFrame();
                        }
                        -------------------------------------
                        SUBMIT script:

                        on (release) {
                        this._parent.form_mc.my_lv = new LoadVars();
                        re_lv = new LoadVars();

                        this._parent.form_mc.my_lv.household = household_txt.text;
                        this._parent.form_mc.my_lv.water = water_txt.text;
                        this._parent.form_mc.my_lv.soft = soft_txt.text;
                        this._parent.form_mc.my_lv.bottle = bottle_txt.text;
                        this._parent.form_mc.my_lv.comments = comments_txt.text;
                        this._parent.form_mc.my_lv.namebus = namebus_txt.text;
                        this._parent.form_mc.my_lv.address1 = address1_txt.text;
                        this._parent.form_mc.my_lv.address2 = address2_txt.text;
                        this._parent.form_mc.my_lv.phone = phone_txt.text;
                        this._parent.form_mc.my_lv.email = email_txt.text;
                        re_lv.onLoad = function(success) {
                        {
                        getURL(" http://www.ecowaterpb.com/thanks.html");
                        }
                        }
                        this._parent.form_mc.my_lv.sendAndLoad("analysisformphp.php", re_lv, "POST");


                        CHANGED NOTHING IN PHP:

                        <?php

                        $SendTo .= "art.design@comcast.net";
                        $subject .= "My Analysis Form Reply";

                        $headers = "From: " . $_POST["name"];
                        $headers .= "<" . $_POST["email"] . ">\r\n";
                        $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
                        $headers .= "Return-Path: " . $_POST["email"];

                        $message .= "household: " . $_POST["household"]. "\r\n";
                        $message .= "water supply: " . $_POST["water"]. "\r\n";
                        $message .= "softener: " . $_POST["soft"]. "\r\n";
                        $message .= "bottled water: " . $_POST["bottle"]. "\r\n";
                        $message .= "comments: " . $_POST["comments"]. "\r\n";
                        $message .= "name/business: " . $_POST["namebus"]. "\r\n";
                        $message .= "street: " . $_POST["address1"]. "\r\n";
                        $message .= "city, state, zip: " . $_POST["address2"]. "\r\n";
                        $message .= "phone: " . $_POST["phone"];
                        $message .= "email: " . $_POST["email"];

                        mail($SendTo, $subject, $headers, $message);

                        header('Location: http://ecowaterpb.com/thanks.html');

                        ?>

                        • 9. Re: Attn: David Stiller
                          Level 7
                          Mary Alice,

                          > You guys know more than me about Actionscript and
                          > PHP. Let's solve in asap.

                          We're trying. ;) Sincerely.

                          > I repaired some of the scripting and now the Thank you
                          > page appears!

                          Yay!

                          > but still nothing in email other than defined. I really need
                          > to solve this!

                          Check the other thread, entitled "MOVIE CLIP," where I clarified a typo
                          in my previous reply to you on that thread (again, apologies). It sounds
                          like you're almost out of the woods.


                          David Stiller
                          Adobe Community Expert
                          Dev blog, http://www.quip.net/blog/
                          "Luck is the residue of good design."


                          • 10. Re: Attn: David Stiller
                            Mary_Alice Level 1

                            I think this is the reply you are talking about. It was in the MOVIE CLIP post.

                            Mary Alice,

                            > Whoops. No variable name for the FORM, only an instance of
                            > name: FORM. And it does not seem to have an instance name.

                            First all, I need to clarify a major typo in my last post. I totally
                            destroyed the object reference I've been trying to explain, so please accept
                            my apologies, and I hope my current reply will clarify matters.

                            Because your path contains the expression "form_mc," the instance name
                            of that movie clip -- the one that's holding all the text fields -- needs to
                            be form_mc (because that's the name in your path).

                            Think of this in terms of folders on your hard drive; it's a great
                            analogy to what's going on here. That button interprets the ActionScript
                            object reference like this: "From my own point of view (this), I'll look up
                            one 'folder' to the timeline I'm in (_parent). From there, I'll look look
                            for an object with the instance name form_mc. That movie clip contains a
                            number of nested objects, one of whose instance names is household_txt.
                            That nested object is a text field, which means it has a text property.
                            That's what I want." So, string those all together and you get:

                            this._parent.form_mc.household_txt.text;

                            That's the location of one of the text fields from the point of view of
                            the ActionScript associated with your button. In my last reply -- I'll
                            blame it on a lack of coffee today (lame excuse!) -- I put that object
                            reference (that "folder path," if you will) in the wrong place.

                            Consider what you're after, though, it it should make sense. Since the
                            ActionScript is associated with the button, everything must be taken from
                            the button's point of view. The LoadVars instance is created inside the
                            button, so from the button's point of view, the LoadVars instance (my_lv) is
                            right there.

                            e.g.
                            on (release) {
                            my_lv = new LoadVars();
                            re_lv = new LoadVars();

                            So far, so good. If you want to refer to my_lv or re_lv again while
                            inside this on() handler, no object path is necessary. If you wanted to,
                            you could use this.my_lv or this.re_lv, but even without the "this," the
                            path to these objects is understood: they're right here. So, as you create
                            new properties for the my_lv object, you name the object and its new
                            property ...

                            my_lv.household =

                            ... and set that new property equal to the value of the TextField.text
                            property of one of your text fields in the path we just covered; namely,
                            this._parent.form_mc.household_txt.text. So ...

                            my_lv.household = this._parent.form_mc.household_txt.text;

                            ... and so on, with the rest of them:

                            my_lv.water = this._parent.form_mc.water_txt.text;
                            my_lv.soft = this._parent.form_mc.soft_txt.text;
                            // etc.

                            Does that clear it up?

                            Note: even after you update all of this, you may still run into
                            problems, so keep your chin up. There's a lot going on here, and you'll
                            need to work through each concept until you get it. The concept we're
                            working toward right now is object references.

                            > Or, is instance of the same as instance name?

                            The term instance refers to an object made from a template. If you use
                            the drawing tools to create some artwork and convert that artwork into a
                            movie clip, a new movie clip symbol will appear in your Library panel. You
                            can drag as many copies of that movie clip symbol to the Stage as you like.
                            Doing so means you're creating that many "instances of" the MovieClip class;
                            in particular, "instances of" a very specific movie clip in your Library.
                            Every dynamic or input text field you create, even if it isn't symbol, is
                            automatically an "instance of" the TextField class. Even if you don't give
                            them instance names, they're still instances of the classes (the type of
                            object) they represent. But without instance names, it's much hard to get
                            ActionScript to speak directly to any of them.


                            David Stiller
                            Adobe Community Expert
                            Dev blog, http://www.quip.net/blog/
                            "Luck is the residue of good design."
                            • 11. Re: Attn: David Stiller
                              Mary_Alice Level 1
                              I see I have the form_mc as the instance name but not the instance of, that is only named form. Hmmmmmmmmm Change will come soon. Hope it solves all!
                              • 12. Attn: David Stiller
                                Mary_Alice Level 1
                                PROGRESS!!!!!!

                                When I type in one of the fields of the form, say I am at household and I type 2, all the other fields light up with 2. Whatever I type in whatever field I am at, all things change to what I am presently typing--all the other fields light up. HELP on this!

                                See what has come in email! and still where is household?:
                                water supply: 2
                                softener: 2
                                bottled water: 2
                                comments: 2
                                name/business: 2
                                street: 2
                                city, state, zip: 2
                                phone: 2email: 2

                                From: <2>
                                Reply-To: 2
                                Return-Path: 2
                                • 13. Re: Attn: David Stiller
                                  Mary_Alice Level 1
                                  Well, I had to remove the 'instance name' from each field. I kept the 'variable.' For example, water_txt was in the instance name area and water_txt was in the variable name area. If I kept the instance names, the field would light up all the other fields with same typed word or numerals.
                                  • 14. Re: Attn: David Stiller
                                    Level 7
                                    Mary Alice,

                                    > Well, I had to remove the 'instance name' from each field.

                                    You need to put them all back. Each text field's instance name must be
                                    unique, because the value for each text field must be unique.

                                    > I kept the 'variable.' For example, water_txt was in the
                                    > instance name area and water_txt was in the variable
                                    > name area.

                                    Given the ActionScript on your button, in the on (release) code, the
                                    easiest way to proceed is to a) get rid of every variable name area on every
                                    text field and b) add instance names that correspond to the instance names
                                    used in your button code (i.e., household_txt, water_txt, soft_txt, etc.).

                                    Remember, I did say earlier that even if you made these changes, you
                                    might still run into a few problems. We can iron those all out, we really
                                    can, but it's important that you follow the steps suggested to you, even if
                                    they don't make sense. Ideally, you'll have a moment of clarity and
                                    everything will fall into place, but in the very least, we should be able to
                                    get your form submitting properly.


                                    David Stiller
                                    Adobe Community Expert
                                    Dev blog, http://www.quip.net/blog/
                                    "Luck is the residue of good design."


                                    • 15. Re: Attn: David Stiller
                                      Mary_Alice Level 1
                                      RE: Given the ActionScript on your button, in the on (release) code, the
                                      easiest way to proceed is to a) get rid of every variable name area on every
                                      text field and b) add instance names that correspond to the instance names
                                      used in your button code (i.e., household_txt, water_txt, soft_txt, etc.).

                                      So you are telling me to delete the variable names shown on the fla file for each text field but keep the instance names that correspond to that found on button script. Right? Well, here it goes. Be back in touch.
                                      • 16. Re: Attn: David Stiller
                                        Mary_Alice Level 1
                                        Great Progress!!!!!

                                        Problems that need solving NOW:
                                        1. too many emails are appearing
                                        2. the 'household' still does not come in email

                                        Strange about household not appearing in the email. What do you think the problem is with that title?


                                        water supply: city
                                        softener: American
                                        bottled water: store
                                        comments: best to call
                                        name/business: Illustration
                                        street: Crossing
                                        city, state, zip: Somewhere, FL 34000
                                        phone: 772-222-2222email: maj@comcast.net

                                        From: <maj@comcast.net>
                                        Reply-To: maj@comcast.net
                                        Return-Path: maj@comcast.net
                                        • 17. Re: Attn: David Stiller
                                          Mary_Alice Level 1
                                          What is wrong with 'household' ? It does not show. Mary Alice

                                          • 18. Re: Attn: David Stiller
                                            Level 7
                                            Mary Alice,

                                            >> Great Progress!!!!!
                                            >>
                                            >> Problems that need solving NOW

                                            I appreciate the timing of all this -- deadlines are stressful! -- but
                                            keep in mind, we're all just everyday Joes here. ;) We're all working on
                                            projects of our own, for a boss or clients, or what-have-you. Folks who
                                            help here are doing so on a volunteer basis, as time allows.

                                            > What is wrong with 'household' ? It does not show.

                                            Have you double-checked the instance name of that text field? Have you
                                            submitted to the PHP script with an HTML version of this form (to make sure
                                            it's not something with the PHP)?


                                            David Stiller
                                            Adobe Community Expert
                                            Dev blog, http://www.quip.net/blog/
                                            "Luck is the residue of good design."


                                            • 19. Re: Attn: David Stiller
                                              Mary_Alice Level 1
                                              I checked the instance name, in fact, I changed the instance name, thinking shorter might work.
                                              So it now household has become 'house' for the instance name. And I changed it in the php.

                                              Most recent script follows.
                                              • 20. Re: Attn: David Stiller
                                                Mary_Alice Level 1
                                                I just tested it again and still no household comes in email. Strange.

                                                Also, is there a need for two closed brackets that follow url line? Why not just one closed bracklet there?
                                                Also, I don't understand the need for an extra open bracket after the re ....success line? Why not just one open bracklet there?
                                                I often wondered about those bracklets?
                                                • 21. Re: Attn: David Stiller
                                                  Level 7
                                                  Mary Alice,

                                                  >I checked the instance name, in fact, I changed the
                                                  > instance name, thinking shorter might work.

                                                  Funny as this line may sound, size doesn't matter -- not in this
                                                  context.

                                                  > So it now household has become 'house' for the
                                                  > instance name. And I changed it in the php.

                                                  That's fine. Now we need to find out if your PHP code is capable of
                                                  receiving that particular variable in the first place. Set aside your Flash
                                                  file for just a moment. Don't change anything. Save save your work and set
                                                  it aside.

                                                  Do you know how to create an HTML form that submits to the same PHP
                                                  file?


                                                  David Stiller
                                                  Adobe Community Expert
                                                  Dev blog, http://www.quip.net/blog/
                                                  "Luck is the residue of good design."


                                                  • 22. Re: Attn: David Stiller
                                                    clbeech Level 3
                                                    Say, good work Mary, and you as well David.

                                                    I'd mentioned the other day (in one of the posts :) that you should remove the 'concatenator' (the period) from the first $message var in the PHP doc. (ie. the one for 'household') that should 'start' the string.
                                                    • 23. Re: Attn: David Stiller
                                                      Mary_Alice Level 1
                                                      I took the peiod away but that did not help. I think I will add another line for house. A repeat of it might work. However, I wonder why I would need to do that.? Yes, David, I was going to create an html form but that is a bit time consuming.
                                                      Here is how the PHP script now looks.
                                                      • 24. Re: Attn: David Stiller
                                                        Mary_Alice Level 1
                                                        I just added another household line and with a period. The first I had removed the period. Still no household appeared in email. This is very strange. Now, how would an HTML form tell us anything? You seem to think it will help, I suppose I will do one up. Time consuming though.
                                                        • 25. Re: Attn: David Stiller
                                                          Level 7
                                                          Mary Alice,

                                                          > Now, how would an HTML form tell us anything?

                                                          If the HTML form successfully sends to the PHP and everything shows up,
                                                          you know the error is entirely contained in the Flash file. If you don't do
                                                          that test, the error might be in either (or both), and it's harder to narrow
                                                          down the possibilities.

                                                          > You seem to think it will help, I suppose I will do
                                                          > one up. Time consuming though.

                                                          Surely, though, less time consuming than continued stabs in the dark,
                                                          right? ;) All you really need is a plain vanilla HTML page with a FORM tag
                                                          and a handful of INPUT tags that use the same variable names as the ones in
                                                          your Flash document.

                                                          Practically every time I build a Flash-to-PHP (or ASP, or whatever)
                                                          form, I throw together a quick HTML test page. Takes less than ten minutes.


                                                          David Stiller
                                                          Adobe Community Expert
                                                          Dev blog, http://www.quip.net/blog/
                                                          "Luck is the residue of good design."


                                                          • 26. Re: Attn: David Stiller
                                                            Mary_Alice Level 1
                                                            I created html file. I clicked onto the analysis form area and clicked onto form at top. I completed the form and clicked onto submit of that form, not the analysis form. Then comes:
                                                            Method Not Allowed
                                                            The requested method POST is not allowed for the URL /form.html.

                                                            This is the html coding:
                                                            • 27. Re: Attn: David Stiller
                                                              Level 7
                                                              Mary Alice,

                                                              > I created html file. I clicked onto the analysis form area
                                                              > and clicked onto form at top. I completed the form and
                                                              > clicked onto submit of that form, not the analysis form.

                                                              I'm afraid I'm not sure I follow that, but having the HTML file is a
                                                              good start. This should be a separate HTML document, completely unrelated
                                                              to the page that currently holds your SWF. In this new HTML document, the
                                                              FORM element and all its child elements, must be formatted according to a
                                                              certain format. Here's my take on it:

                                                              <html>
                                                              <head>
                                                              <title>Form test</title>
                                                              </head>
                                                              <body>
                                                              <form id="form1" name="form1" method="post" action="formphp.php">
                                                              <input type="text" name="name" id="name" /> name<br />
                                                              <input type="text" name="email" id="email" /> email<br />
                                                              <input type="text" house="house" id="house" /> house<br />
                                                              <input type="text" name="water" id="water" /> water<br />
                                                              <input type="text" name="soft" id="soft" /> soft<br />
                                                              <input type="text" name="bottle" id="bottle" /> bottle<br />
                                                              <input type="text" name="comments" id="comments" /> comments<br />
                                                              <input type="text" name="namebus" id="namebus" /> namebus<br />
                                                              <input type="text" name="address1" id="address1" /> address1<br />
                                                              <input type="text" name="address2" id="address2" /> address2<br />
                                                              <input type="text" name="phone" id="phone" /> phone<br />
                                                              <input type="text" name="message" id="message" /> message<br />
                                                              <input type="submit" name="button" id="button" value="Submit" />
                                                              </form>
                                                              </body>
                                                              </html>

                                                              That's totally bare bones, with standard element attributes. Give that
                                                              one a shot and let's see what you get back.


                                                              David Stiller
                                                              Adobe Community Expert
                                                              Dev blog, http://www.quip.net/blog/
                                                              "Luck is the residue of good design."


                                                              • 28. Re: Attn: David Stiller
                                                                Mary_Alice Level 1
                                                                Well I placed the html in the public html folder. Also, place the php there as well. Then I went up to the address locator on internet explorer and typed in www.ecowaterpb.com/formphp.html

                                                                It took me to the that html form. I completed all areas and then submited. It even went to the thank you page because that is on the php file. I looked in my email and this is what has come:

                                                                city, state, zip: somewhere, FL 00000
                                                                phone: 772-555-5555email: maryalicejohnson@comcast.netcomments: call first then email


                                                                From: maj<maryalicejohnson@comcast.net>
                                                                Reply-To: maryalicejohnson@comcast.net
                                                                Return-Path: maryalicejohnson@comcast.net

                                                                Really strange. I wonder sometimes whether it will ever be solved. Do you think it has something to do with the server? Just wonder why it did not pick up all of the form titles and the typed information I had typed.
                                                                • 29. Re: Attn: David Stiller
                                                                  Level 7
                                                                  Mary Alice,

                                                                  > I completed all areas and then submited. It even went to the
                                                                  > thank you page because that is on the php file. I looked in
                                                                  > my email and this is what has come:
                                                                  >
                                                                  > city, state, zip: somewhere, FL 00000
                                                                  > // etc.

                                                                  Well, that's bona fide odd. Some are coming through and some aren't.
                                                                  Here they are, all in a row ... ActionScript, PHP, and HTML (see below).
                                                                  They overlap almost 100%, and in any case, the ones that do overlap should
                                                                  work in all cases.

                                                                  I don't know what else has changed in the equation, or if that PHP file
                                                                  is getting processed erratically.

                                                                  If you switch back to the SWF file, does it still work as before?
                                                                  Meaning, does everything submit except for the house/house_txt one?


                                                                  David Stiller
                                                                  Adobe Community Expert
                                                                  Dev blog, http://www.quip.net/blog/
                                                                  "Luck is the residue of good design."


                                                                  my_lv.house = this._parent.form_mc.house_txt.text;
                                                                  my_lv.water = this._parent.form_mc.water_txt.text;
                                                                  my_lv.soft = this._parent.form_mc.soft_txt.text;
                                                                  my_lv.bottle = this._parent.form_mc.bottle_txt.text;
                                                                  my_lv.comments = this._parent.form_mc.comments_txt.text;
                                                                  my_lv.namebus = this._parent.form_mc.namebus_txt.text;
                                                                  my_lv.address1 = this._parent.form_mc.address1_txt.text;
                                                                  my_lv.address2 = this._parent.form_mc.address2_txt.text;
                                                                  my_lv.phone = this._parent.form_mc.phone_txt.text;
                                                                  my_lv.email = this._parent.form_mc.email_txt.text;

                                                                  $message .= "household: " . $_POST["house"]. "\r\n";
                                                                  $message .= "water supply: " . $_POST["water"]. "\r\n";
                                                                  $message .= "softener: " . $_POST["soft"]. "\r\n";
                                                                  $message .= "bottled water: " . $_POST["bottle"]. "\r\n";
                                                                  $message .= "comments: " . $_POST["comments"]. "\r\n";
                                                                  $message .= "name/business: " . $_POST["namebus"]. "\r\n";
                                                                  $message .= "street: " . $_POST["address1"]. "\r\n";
                                                                  $message .= "city, state, zip: " . $_POST["address2"]. "\r\n";
                                                                  $message .= "phone: " . $_POST["phone"];
                                                                  $message .= "email: " . $_POST["email"];

                                                                  <input type="text" name="name" id="name" /> name<br />
                                                                  <input type="text" name="email" id="email" /> email<br />
                                                                  <input type="text" house="house" id="house" /> house<br />
                                                                  <input type="text" name="water" id="water" /> water<br />
                                                                  <input type="text" name="soft" id="soft" /> soft<br />
                                                                  <input type="text" name="bottle" id="bottle" /> bottle<br />
                                                                  <input type="text" name="comments" id="comments" /> comments<br />
                                                                  <input type="text" name="namebus" id="namebus" /> namebus<br />
                                                                  <input type="text" name="address1" id="address1" /> address1<br />
                                                                  <input type="text" name="address2" id="address2" /> address2<br />
                                                                  <input type="text" name="phone" id="phone" /> phone<br />
                                                                  <input type="text" name="message" id="message" /> message<br />


                                                                  • 30. Re: Attn: David Stiller
                                                                    Mary_Alice Level 1
                                                                    Just tested the analysis form. Here is what has come to email...everything except household number. I do not know what to do. Perhaps, I will change the name...perhaps, php or server is not liking house. Silly but anything is possible. And as for that html form...test it on your site by putting your email in place of mine. See if it works from your server. If so, it must be the server they are using, nomonthlyfees.com.

                                                                    water supply: city
                                                                    softener: Americana
                                                                    bottled water: Grocery Store
                                                                    comments: Just email
                                                                    name/business: Business
                                                                    street: Crossing
                                                                    city, state, zip: Somewhere, FL 00000
                                                                    phone: 772-555-5555email: maryalicejohnson@comcast.net

                                                                    From: <maryalicejohnson@comcast.net>
                                                                    Reply-To: maryalicejohnson@comcast.net
                                                                    Return-Path: maryalicejohnson@comcast.net
                                                                    • 31. Re: Attn: David Stiller
                                                                      Mary_Alice Level 1
                                                                      The analysis form is doing far better than the html form. Well, I am going to change the house name. I know it sounds silly but I need to see if that will work.
                                                                      • 32. Re: Attn: David Stiller
                                                                        Level 7
                                                                        Mary Alice,

                                                                        > The analysis form is doing far better than the html form.

                                                                        Fair enough. :)

                                                                        > Well, I am going to change the house name. I know it
                                                                        > sounds silly but I need to see if that will work.

                                                                        Before you do that, you may as well just throw a quick trace() statement
                                                                        in there to make sure the object reference is correct. For example ...

                                                                        my_lv.house = this._parent.form_mc.house_txt.text;
                                                                        trace(this._parent.form_mc.house_txt.text);
                                                                        my_lv.water = this._parent.form_mc.water_txt.text;
                                                                        // etc.

                                                                        The trace will put the value of the stated expression into the Output
                                                                        panel. It might even help to precede that a bit with a string literal, in
                                                                        case the object reference somehow comes back with an empty string:

                                                                        my_lv.house = this._parent.form_mc.house_txt.text;
                                                                        trace("value of house: " + this._parent.form_mc.house_txt.text);
                                                                        my_lv.water = this._parent.form_mc.water_txt.text;
                                                                        // etc.

                                                                        If it comes back empty or undefined, you'll know that somehow your
                                                                        object reference is wonky.


                                                                        David Stiller
                                                                        Adobe Community Expert
                                                                        Dev blog, http://www.quip.net/blog/
                                                                        "Luck is the residue of good design."


                                                                        • 33. Re: Attn: David Stiller
                                                                          Mary_Alice Level 1
                                                                          I changed the name and household number still does not show in email. Gosh, I really wanted to complete the website. I wonder if something in the php script is preventing household number and typed information from appearing.

                                                                          Here is the php script.

                                                                          <?php

                                                                          $SendTo .= "art.design@comcast.net";
                                                                          $subject .= "Analysis Form Reply";

                                                                          $headers = "From: " . $_POST["name"];
                                                                          $headers .= "<" . $_POST["email"] . ">\r\n";
                                                                          $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
                                                                          $headers .= "Return-Path: " . $_POST["email"];

                                                                          $message .= "household: " . $_POST["house"]. "\r\n";
                                                                          $message .= "water supply: " . $_POST["water"]. "\r\n";
                                                                          $message .= "softener: " . $_POST["soft"]. "\r\n";
                                                                          $message .= "bottled water: " . $_POST["bottle"]. "\r\n";
                                                                          $message .= "comments: " . $_POST["comments"]. "\r\n";
                                                                          $message .= "name/business: " . $_POST["namebus"]. "\r\n";
                                                                          $message .= "street: " . $_POST["address1"]. "\r\n";
                                                                          $message .= "city, state, zip: " . $_POST["address2"]. "\r\n";
                                                                          $message .= "phone: " . $_POST["phone"];
                                                                          $message .= "email: " . $_POST["email"];

                                                                          mail($SendTo, $subject, $headers, $message);

                                                                          header('Location: http://ecowaterpb.com/thanks.html');

                                                                          ?>

                                                                          • 34. Re: Attn: David Stiller
                                                                            Level 7
                                                                            Mary Alice,

                                                                            >I changed the name and household number still does not show
                                                                            > in email.

                                                                            Did you try the trace() statement suggestion I made in my previous
                                                                            reply?


                                                                            David Stiller
                                                                            Adobe Community Expert
                                                                            Dev blog, http://www.quip.net/blog/
                                                                            "Luck is the residue of good design."


                                                                            • 35. Re: Attn: David Stiller
                                                                              Mary_Alice Level 1
                                                                              No. But tell me where to put it. That might help, I hope so! Does it go in the PHP script?
                                                                              • 36. Re: Attn: David Stiller
                                                                                Level 7
                                                                                Mary Alice,

                                                                                > No. But tell me where to put it. That might help, I
                                                                                > hope so! Does it go in the PHP script?

                                                                                The trace() function is one of the many debugging tools in Flash. My
                                                                                suggestion, a couple posts ago, was to trace out the value of this
                                                                                expression ...

                                                                                this._parent.form_mc.house_txt.text

                                                                                .... to see what comes back (see my reply on 11/21 at 12:15AM).

                                                                                For a whole article on debugging in ActionScript 2.0 (which is what
                                                                                you're using), check out my Dev Center article:

                                                                                http://www.adobe.com/devnet/flash/articles/debugging_actionscript.html

                                                                                If the issue here is Flash, then it seems like you're experiencing one
                                                                                minor setback that should be easy to find. If the issue is PHP (or the
                                                                                server, etc.), it would be harder, if not impossible, for me to help you
                                                                                troubleshoot. I was really expecting the HTML form to work just fine!


                                                                                David Stiller
                                                                                Adobe Community Expert
                                                                                Dev blog, http://www.quip.net/blog/
                                                                                "Luck is the residue of good design."


                                                                                • 37. Re: Attn: David Stiller
                                                                                  Mary_Alice Level 1
                                                                                  I performed a Trace. The Trace addition onto Fla Flash form, see below:

                                                                                  on (release) {
                                                                                  my_lv = new LoadVars();
                                                                                  re_lv = new LoadVars();

                                                                                  my_lv.house = this._parent.form_mc.house_txt.text;
                                                                                  trace("value of house: " +
                                                                                  my_lv.water = this._parent.form_mc.water_txt.text;
                                                                                  trace("value of water: " +
                                                                                  my_lv.soft = this._parent.form_mc.soft_txt.text;
                                                                                  trace("value of soft: " +
                                                                                  my_lv.bottle = this._parent.form_mc.bottle_txt.text;
                                                                                  trace("value of bottle: " +
                                                                                  my_lv.comments = this._parent.form_mc.comments_txt.text;
                                                                                  trace("value of comments: " +
                                                                                  my_lv.namebus = this._parent.form_mc.namebus_txt.text;
                                                                                  trace("value of namebus: " +
                                                                                  my_lv.address1 = this._parent.form_mc.address1_txt.text;
                                                                                  trace("value of address1: " +
                                                                                  my_lv.address2 = this._parent.form_mc.address2_txt.text;
                                                                                  trace("value of address2: " +
                                                                                  my_lv.phone = this._parent.form_mc.phone_txt.text;
                                                                                  trace("value of phone: " +
                                                                                  my_lv.email = this._parent.form_mc.email_txt.text;
                                                                                  trace("value of email: " +

                                                                                  re_lv.onLoad = function(success) {
                                                                                  {
                                                                                  getURL(" http://www.ecowaterpb.com/thanks.html");
                                                                                  }
                                                                                  }
                                                                                  my_lv.sendAndLoad("analysisformphp.php", re_lv, "POST");
                                                                                  }


                                                                                  NEXT COMES THE ERROR MESSAGE, SEE MESSAGE BELOW:

                                                                                  • 38. Re: Attn: David Stiller
                                                                                    Mary_Alice Level 1
                                                                                    Notice there is no mention of 'household' ! ?
                                                                                    • 39. Re: Attn: David Stiller
                                                                                      Level 7
                                                                                      Mary Alice,

                                                                                      > Notice there is no mention of 'household' ! ?

                                                                                      No mention of anything, because of the error message! :)

                                                                                      Follow this format carefully:

                                                                                      my_lv.house = this._parent.form_mc.house_txt.text;
                                                                                      trace("value of house: " + this._parent.form_mc.house_txt.text);

                                                                                      Note that the only part you're tracing is a) a string ("value of house:
                                                                                      "), b) a plus sign, and c) the expression
                                                                                      this._parent.form_mc.house_txt.text, which is the object reference to the
                                                                                      text field -- the only text field -- that is causing you issues.


                                                                                      David Stiller
                                                                                      Adobe Community Expert
                                                                                      Dev blog, http://www.quip.net/blog/
                                                                                      "Luck is the residue of good design."


                                                                                      1 2 3 Previous Next