A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Sending form variables...

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702

    Sending form variables...

    Is there an easier way to send specific form variables than
    code:

    on(release) {
    geturl("http://merajsami.com/displaydata.asp?txtFristName=" + _root.txtFirstName + "&txtLastName=" + _root.txtLastName + "&txtAddress1=" + _root.txtAddress1 + "&txtAddress2=" + txtAddress2 + "&txtEmail=" + txtEmail,"_self","POST");
    }

    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  2. #2
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Someone else is gonna have to take this one. I hate that method of POSTing variables.

    As a matter of fact, for 2006, I plan on never using a routine like that or even using the word "loadVariables" again.

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Use loadVariables and all variables from the the current movie are sent either POST or GET without having to put them in the URL like that.

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    I know. I did use the "Send Form Data" option but then it sends EVERY variable in the form. Even the Dynamic Text I load for display purposes only. The result is an eMail that is cluttered with variable data.

    I think what I'll just end up doing is simply embedding the form text. This way the ONLY variables in the form will be the information that is collected. It's a form, the embeded text shouldn't make it too big being the type of movie it is.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  5. #5
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Ok here's the deal you don't have to use all the variables on the server side, just ignore the ones you don't want. Or you can make the form a child clip call it like myForm and then use myForm.loadVariables and it will only send the variables in that clip.

  6. #6
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Quote Originally Posted by Chris_Seahorn
    As a matter of fact, for 2006, I plan on never using a routine like that or even using the word "loadVariables" again.
    How are you transfering data to and from the server then?

  7. #7
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    Simple example

    Dave here's a simple example. You can even load this as a seperate SWF into a main movie.
    Attached Files Attached Files

  8. #8
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    It seems best if I do make the actual form variables itself into a separate movie. Man, that's a lot to go back and change now...

    You can see a working version of the form at http://www.nsfilms.com/ckitchens/founders_form.html
    It will eventually be a pop-up form that will be appropriately sized.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  9. #9
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Keep it just the way it is. Just change all the textfields that have variable names to have instance names instead. The example I am going to post uses the modern method using instance names.

    Should be posted in a sec. I didn't recreate all your fields but you will get the idea on how to send what YOU WANT.

  10. #10
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    Just change all the textfields that have variable names
    This might be EXACTLY what I'm looking for.
    I was just about to post a question of, "Is it possible to simply remove the variable from a Dynamic Text Field?"...I look forward to the answer of the Instance naming.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center