Click to See Complete Forum and Search --> : Sending form variables...
dniezby
01-02-2006, 11:12 AM
Is there an easier way to send specific form variables than
on(release) {
geturl("http://merajsami.com/displaydata.asp?txtFristName=" + _root.txtFirstName + "&txtLastName=" + _root.txtLastName + "&txtAddress1=" + _root.txtAddress1 + "&txtAddress2=" + txtAddress2 + "&txtEmail=" + txtEmail,"_self","POST");
}
Chris_Seahorn
01-02-2006, 11:20 AM
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.
blanius
01-02-2006, 06:09 PM
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.
dniezby
01-03-2006, 11:35 AM
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.
blanius
01-03-2006, 11:59 AM
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.
blanius
01-03-2006, 12:00 PM
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?
blanius
01-03-2006, 12:16 PM
Dave here's a simple example. You can even load this as a seperate SWF into a main movie.
dniezby
01-03-2006, 01:38 PM
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.
Chris_Seahorn
01-03-2006, 01:46 PM
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.
dniezby
01-03-2006, 01:52 PM
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.
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.