Get Form Field Values
Hey Guys,I'm trying to grab the values of two text fields called "userinput" and "passinput" then turn them into variables.This is what I haveon (release, keyPress "<Enter>") {var user = (w.e code i use to grab the value);var pass = (w.e code i use to grab the value);then the rest of my code continued blah blah blah}If you could help me this would be great.
KirupaForum > Flash > ActionScript 3.0
Posted on: 04-19-2008, 01:44 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flash Form Question : Sending HTML Form Values...
I'm trying to create a flash form version of an HTML form. It's basically just a voting drop down menu - user chooses "Yes", "no","maybe" from teh drop down and hits a submit buttons which would send the results to a CGI script though POST. I understand the submission aspect, but am not sure how to assign values to the drop down in the same way HTML does:
<option value="yes">
<option value="no>
...
Do I just set the combo box Data array to [yes,no,maybe]? If so, how is it to be sent?
thanks
Form Field Validation, Specially Email Field. Any Ideas?
Hi. I have a simple flash form designed for my website i have all things done but i am not getting the idea how to validate the "Email" field like you validate it in JavaScript for an "@" and a "." to be present in the finally submitted form. I need to do it in ActionScript as the other form validation is done in it as well. Please let me know if you can help. Thanks
Form Field Validation, Specially Email Field. Any
Hi. I have a simple flash form designed for my website i have all things done but i am not getting the idea how to validate the "Email" field like you validate it in JavaScript for an "@" and a "." to be present in the finally submitted form. I need to do it in ActionScript as the other form validation is done in it as well. Please let me know if you can help. Thanks
Password Field Values
I've created a little password script, but there appears to be a problem with the values...
http://users.pandora.be/stealthy_hunters/password1.swf
can someone take a look at it and tell me what he thinks...
thx in advance
Using Text Field Values
I thought this was simple but I seem to be getting problems -
all I want to do is add a value to a input textbox and on the press of a button set a variable to that value - simple.
I have an input txtbox called myvalue
I have a button with -
on(press){
trace(myvalue);
}
I test it and get - _level0.myvalue
eh?!!!
monkey
Text Field Only Accepting Values Between 11 - 25
hi
im making a thing where people buying a product enter in the number of products they want to buy. There are different prices for different quantity ranges eg under 10, 11-25, 26-50 etc.
How can i make a text field where the user can only type in a number within that range eg....
...In the 11-25 text field column they can only type in a number between 11 and 25. If they type in 26 it brings up an error box?
thanks for any help
cheers
Syntax For Looping Through Field Values
I need to retrieve the string values from some dynamic text fields. Each row of data contains approximately 5 different items and I need to loop through the rows and stuff the results into a variable, which I call "productInfo". The results will be sent off as an email message (with PHP). Here's the code:
Code:
function getCartValues() {
for (var i:Number = 1; i <= count; i++) {
if (table_mc["display" + i + "_mc"].p_lb.text != undefined) {
var prod_num = table_mc["display" + i + "_mc"].p_lb.text;
var iso_num = table_mc["display" + i + "_mc"].i_lb.text;
var elem_name = table_mc["display" + i + "_mc"].el_lb.text;
var chem_form = table_mc["display" + i + "_mc"].ch_cb.getValue();
var amount = table_mc["display" + i + "_mc"].q_num.value;
productInfo += "Product No.: " + prod_num + "%20%20%20%20%20" + "Element: " + elem_name + "%20%20%20%20%20" + "Isotope: " + iso_num + "%20%20%20%20%20" + "Chemical Form: " + chem_form + "%20%20%20%20%20" + "Quantity: " + amount + "%0a";
}
}
}
If I trace the first var "prod_num" I get a list that looks just the way it's supposed to, but if I try to gather the data from all the vars into one (productInfo) I get a mess:
Code:
trace(prod_num);
//Results:
51-02-121
51-02-123
18-03-38
18-03-40
56-02-130
56-02-132
56-02-134
48-01-106
trace(productInfo);
//Results:
Product No.: 51-02-121%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 121Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0a
Product No.: 51-02-121%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 121Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 51-02-123%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 123Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0a
Product No.: 51-02-121%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 121Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 51-02-123%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 123Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-38%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 38Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0a
Product No.: 51-02-121%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 121Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 51-02-123%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 123Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-38%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 38Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-40%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 40Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0a
Product No.: 51-02-121%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 121Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 51-02-123%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 123Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-38%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 38Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-40%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 40Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-130%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 130Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0a
Product No.: 51-02-121%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 121Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 51-02-123%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 123Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-38%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 38Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-40%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 40Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-130%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 130Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-132%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 132Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0a
Product No.: 51-02-121%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 121Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 51-02-123%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 123Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-38%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 38Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-40%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 40Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-130%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 130Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-132%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 132Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-134%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 134Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0a
Product No.: 51-02-121%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 121Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 51-02-123%20%20%20%20%20Element: Antimony%20%20%20%20%20Isotope: 123Sb%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-38%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 38Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 18-03-40%20%20%20%20%20Element: Argon%20%20%20%20%20Isotope: 40Ar%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-130%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 130Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-132%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 132Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 56-02-134%20%20%20%20%20Element: Barium%20%20%20%20%20Isotope: 134Ba%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0aProduct No.: 48-01-106%20%20%20%20%20Element: Cadmium%20%20%20%20%20Isotope: 106Cd%20%20%20%20%20Chemical Form: %20%20%20%20%20Quantity: 0%0a
I'm kind of bleary eyed - Can someone tell me what's wrong with the syntax?
Saving Input Text Field Values.
Is it possible to save text entered by a user in a flash movie? The problem I have come across is this: I have two date fields with a default date of 00-00-0000, a city field, and a state field. The user is prompted to fill in the two date fields and the city field, and then the user is directed to another area in the movie to find the correct state abbreviation, and then returned to the previous area to enter the state abbreviation. When the user returns to the input screen, the data he or she has entered is gone. Is there a way to temporarily store/save the data that the user types into these fields?
Reading Array Values From A Text Field
if you want to pull values out of an array in actionscript, it's easy... but how would you do it if you want a text field to reflect array values?
myArray.1 and myArray[1] don't pull the value correclty; the only way i could get it to pass was if i first defined a NEW variable that was always equal to the slot I needed, and then to reference that variable in the text field variable name. am i missing something?
Pushing Values From Text Field Into Array
Hello everybody!
Please help! I created dynamically a text field. If the user types a number to it and clicks on the button, it generates other x (number) text fields. Now the user should fill these fields with numbers too. What I would like to get: I want to get the numbers from these fields and put them into array, like the number from first field should be on position [0], from the second field on position [1] and so on. This is the part of the code, where the 2nd level fields are generated:
code:
for (var i = 1; i<=number_input_1stfield; i++) {
_root.createTextField("varValues"+i, 1000+i, 400, 20*i, 20, 20);
_root["varValues"+i].border = true;
_root["varValues"+i].borderColor = 0x000000;
_root["varValues"+i].background = true;
_root["varValues"+i].backgroundColor = 0xFEF9C2;
_root["varValues"+i].type = "input";
_root["varValues"+i].variable = "ar"+i;
myArray.push(WHAT TO WRITE HERE???);
}
How can I put the value of each field into an Array? I simply can't figure it out!
Any help greatly appreciated! Thanks a bunch!
Poco
Compare Values From Array With A Random Value From A Field
Hello there
I'm working with a project that i need to load 3 external images, so i create an empty array to insert the values later.
I first write a test. This is what i did:
var objArray:Array = new Array();
for (var i:Number = 0; i < 5; i++) {
var numPush:Number = random(10);
objArray.push(numPush);
}
Working right, but i really now to write an script that verify if any of the values in the array are equal to the new value in the "numPush", if so then try another random value and verify again and if the new value is not equal to the other ones, push it to "objArray".
I try this, but get an error:
var objArray:Array = new Array();
for (var i:Number = 0; i < 5; i++) {
var numPush:Number = random(10);
for (var u:Number = 0; u < 10; i++) {
if (numPush != objArray[i]) {
objArray.push(numPush);
}
}
}
Any idea to do this ???
Form Values
I have multiple Flash forms that all go to the same database via php I am trying to figure out how to have a pre-determined "Value" for one of these fields... EX : www.expoships.com then "Collectors" then "Invitation Request" Once you choose what type of collector you are a drop down form comes up. I need a way to make the first field or "type of collector" to be filled in and send the different pre-filled fields to my database...I know this is a complicated explanation but I don't know how to ask it any simpler.
Creating A List Of Values To Be Used In A Dynamic Test Field
I have one dynamic text field in a movie clip that gets duplicated 15 times... I need to create a list of values to be placed in that text field one-by-one as the clip is duplicated (each value is used only once). Can some one help me with
1) setting up the list of values
2)the code to grab a value and place it in the text field
(the text field variable is 'label')
Much thanx to the ones who can help.
--(({
Extracting Variable Values From An Input Text Field
Is it possible to extract numbers from a text input field so that I could perform actions. Say I had the following in a single text field:
REPEAT 4
FORWARD 50
RIGHT 90
END
Can I extract the number 4 and apply it to repeat variable, 50 to a Forward variable
Therefore:
_root.repeat=4
_root.forward=50
_root.right=90
Many thanks
Ol
Incrementing Values In A Dynamic Text Field Using Buttons
Second question today.
So I have a movie with 2 dynamic text fields and 2 buttons for each. I want one button for each field to increase the number in the text field by 5 and one to decrease it by 5. Here's how I'm trying to do this:
Code:
var leftTextVar:int = 0;
var rightTextVar:int = 0;
LeftText.text = leftTextVar;
RightText.text = rightTextVar;
LeftUpButton.addEventListener(MouseEvent.MOUSE_UP, leftScoreUp);
LeftDownButton.addEventListener(MouseEvent.MOUSE_UP, leftScoreDown);
RightUpButton.addEventListener(MouseEvent.MOUSE_UP, rightScoreUp);
RightDownButton.addEventListener(MouseEvent.MOUSE_UP, rightScoreDown);
function leftScoreUp(evt:MouseEvent):void {
leftTextVar += 5;
LeftText.text = leftTextVar;
}
function leftScoreDown(evt:MouseEvent):void {
leftTextVar -= 5;
LeftText.text = leftTextVar;
}
function rightScoreUp(evt:MouseEvent):void {
rightTextVar += 5;
RightText.text = rightTextVar;
}
function rightScoreDown(evt:MouseEvent):void {
rightTextVar -= 5;
RightText.text = rightTextVar;
}
here's the error I get:
[i]1067: Implicit coercion of a value of type int to an unrelated type String.
How Do I Populate Scrolling Text Field With Multidimension Array Values?
In my Flash quiz, I have a detailed results page to which I want to post all the questions, answers, and whether the user answered correctly or incorrectly. All this information is stored in a multidimensional array and its successfully showing the results via the trace method.
My question is, what is the syntax for populating a dynamic text field with these results? Do I just write out one long line of AS with the newline command to separate the data? How would I go about applying bold to certain parts of the stored data that I will be showing?
Here is current code for my detailed results page:
function showResults(){
trace("Now showing results");
for(var i:Number = 0; i < NumberOfChallenges; i++){ //This calls the length of the original array (not the spliced copy)
//trace(NumberOfChallenges);
//Make sure that the correct answers are marked in the aShuffledChallenges array
trace("POPULATING TEXT FIELD WITH A RESULT NOW.");
trace("QUESTION:" + aShuffledChallenges[i][0] + newline); //write out the question
trace("ANSWER:" + aShuffledChallenges[i][3] + newline); //write out the answer
trace("Your answer to this question was:" + aShuffledChallenges[i][2] + newline);
}
}
showResults();
Form Remembering Values Entered
I have a company that would like me to develop a detailed online form.
They also want to be able to save the data entered if the user should not want to fill all the form in at that particular time.
What way can I do the form so it will remember any data entered (for each indiidual customer too)
How May I Get In Flash Values Coming From A <form>?
Hello all,
I have a PHP page with a form <form></form> containing:
- some check boxes
- 2 text areas
- a Flash containing buttons (the regions of a country map)
When I click on one of this buttons, I recover in 2 variables some informations about this button. Then I use a navigateToURL() method to open a new PHP page with those 2 variables like this:
Code:
navigateToURL(new URLRequest("./mypage.php?var1=" + value1 + "&var2=" + value2));
In addition to these two variables, I would like to add in the URL the values of my check boxes and of my 2 text areas.
So, when I click on one Flash button, is it possible to collect with Action Script 3 the values of the elements of my form?
If yes, can you tell me how to do?
In advance thank you very much.
Best regards,
Mafate
Printing Just The Values Of A Form In Flash
okay...this ones got me stumped?
I have a form in flash with multiple input fields that the user can fill in with information.
I'd like to print the collected information and a nicely formatted page,
Name Address Phone E-mail
Joe Somewhere 123-7894 jar@youbet.com
I can collect this stuff and put it and textfield contained in a MC and then print that MC.
but if the user puts in more info that the textfield box can display holds...then I up the creek?
anyone do this before?
let me know
jef
ASP - Loosing Form Values After Refresh
Hi,
I'm having a problem where the value in my form are being lost after using getURL to post the form and hitting refresh.
This is not how normal forms work so wasn't sure if I was doing anything wrong. Heres a simplified version of what i'm doing to give you an idea of the flow.
My .swf contains a button with this attached
ActionScript Code:
on (release) {
TransID = "Hello, Im a trans ID";
getURL("DealBuilder.asp", "_self", "POST");
}
My asp page called DealBuilder.asp contains the following code
<%@LANGUAGE="VBSCRIPT"%>
<%
Dim strTransID: strTransID = Request.form("TransID")
Response.write "Form" & strTransID
%>
It works fine when you first hit the page but if you hit refresh it cant seem to get the form value. I could pass it through in a querystring but idealy dont want to.
Can anyone help?
Form Values Only Submit Half The Time?
I've written a Flash validation form that submits to an ASP file. The ASP file checks the username/password in the database against what the user submitted via the Flash.
Inexplicably, the form values don't always get passed from the Flash form to the ASP file when I press the submit button or hit the ENTER key. If my ASP script can't find the Request.Form value, it returns an error. I get that error unpredictably.
Anyone have any idea why this would happen? If I set up a plain HTML form, I don't have any problems. I'm using Flash MX and exporting the SWF as either a Flash-5 or Flash 6 compatible file (get the same results in both), and I have the Flash 6 player. I'm calling the Flash file from either IE 6 or Netscape 7 with the same strange results.
Thanks.
Problems With Passing Form Values To Dynamic
Hey all, I am designing my first Flash MX 2004 program, and consequently have to post my first message
I am writing a calculator script that will take data entered into input fields in one layer, and then parse and pass the data through a scripted button action to dynamic fields grouped in another layer's movie clip.
Now, when I make the dynamic fields appear, I am getting this, "_level0.<symbolname>.<fieldname>" instead of passed data. What am I doing wrong?
Additionally, it does appear that when I am testing formulas, everything works except + formulas. When I use a + formula (e.g. input + 2), it merely adds a 2 to the number, making a 5 + 2 = 7 formula into 5 + 2 = 52.
Finally, I have been pouring of AS 2.0 books, and I understand that I may need to explicitly declare my variables (moreso than placing a name in the var property?), in which part of my application should I do this? In the top action layer? In the script for the submit button on (release)?
Thanks for the help. I hope to contribute here more in the future as time marches on!
- John
3 Pages Form Values To One Submit Button
Hello,
I have 3 pages of questions and comments.
I want to be able to submit all these values on the last page to some php file then to my email.
When I try to do this, I only receive the 3rd page questions and comments to my email but the first 2 pages nothing
How can I carry these values so on the third page I can submit all values thru one php and then to my email.
This is what on my php
PHP Code:
<?php$sendTo = "lolo@lolomedia.com";$subject = "Optional Survey I";$headers = "From: <" . $_POST["email"] .">
";$headers .= "Reply-To: " . $_POST["email"] . "
";$headers .= "Return-path: " . $_POST["email"] . "
";$headers .= "Content-type: text/html";$message = "Prior to completing this orientation, would you have considered some of your e-Mail be corporate records?: $gender1
";$message .= "
";$message .= "Comments: " . $_POST["Smessage1"];$message = "Are you comfortable with how to apply the e-Mail Management and Compliance policy?: $gender2
";$message .= "
";$message .= "Comments: " . $_POST["Smessage2"];$message = "Will this orientation make you re-think how you use the e-Mail system at Progress Energy?: $gender3
";$message .= "
";$message .= "Comments: " . $_POST["Smessage3"];mail($sendTo, $subject, $message, $headers);?>
and this is what i have on my as on the submit action
ActionScript Code:
submitBtn.onRelease=function(){ onSubmit();}function onSubmit() { Smessage1 = Smessage1.text; gender1 = genderGroup1.getValue(); Smessage2 = Smessage2.text; gender2 = genderGroup2.getValue(); Smessage3 = Smessage3.text; gender3 = genderGroup3.getValue(); loadVariables("radio1.php",this,"POST"); loadMovieNum("goodbye.swf",40);}
My fla file is here... please open it to understand better my issue.
http://lolomedia.com/menu6.fla
also here is the link to my submit pages that I'm working on.
http://lolomedia.com/menu6.html
thank you very much for any advice
Flash PHP Email Form Help - Emtpy Values
I've got a swf that has a form inside a movie as follows
_parent.contentMain (an instance of formclip movie)
inside the contentMain I've a form witha submit button with the following code.
===================================
on (press) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
this.loadVariables("email.php", "POST");
}
================================
In the same directory I've got an email.php file with the code as follows. All I get is empty result strings without the actual form variables. Am I a using the loadVariables command wrong?
my server does support php most definately. Cause the email comes through just fine. Just no results in it.
===========================
<?php
/************************************************** *
* PHP 4.1.0+ version of email script. For more
* information on the mail() function for PHP, see
* http://www.php.net/manual/en/function.mail.php
************************************************* **/
// First, set up some variables to serve you in
// getting an email. This includes the email this is
// sent to (yours) and what the subject of this email
// should be. It's a good idea to choose your own
// subject instead of allowing the user to. This will
// help prevent spam filters from snatching this email
// out from under your nose when something unusual is put.
$sendTo = "andrew@intetech.co.za";
$subject = "CJD Emailer result";
// variables are sent to this PHP page through
// the POST method. $_POST is a global associative array
// of variables passed through this method. From that, we
// can get the values sent to this page from Flash and
// assign them to appropriate variables which can be used
// in the PHP mail() function.
// header information not including sendTo and Subject
// these all go in one variable. First, include From:
$headers = "From: CJD Website
";
// next include a replyto
$headers .= "Reply-To:andrew@intetech.co.za
";
// often email servers won't allow emails to be sent to
// domains other than their own. The return path here will
// often lift that restriction so, for instance, you could send
// email to a hotmail account. (hosting provider settings may vary)
// technically bounced email is supposed to go to the return-path email
$headers .= "Return-path:andrew@intetech.co.za";
// now we can add the content of the message to a body variable
$message = "Gender| " . $_POST["gender"] ." Race| ". $_POST["race"] . "Income| "
. $_POST["income"] . "Buycar| ". $_POST["buycar"] ."Kind of kid| ". $_POST["kindofkid"] ."
";
// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $message, $headers);
?>
=========================
Radio Buttons / Variables/ Email Form Values
Hi,
I am not very proficient in actionscript at all. I just managed to find a perl script i was able to configure to get the results of a little (test) form i made back to me (this took me a week 24/7 !!!)
anyway, there are four input text boxes with variables named name, email, zip, colour. They return the expected values. (yay)
However i have two radio buttons whch i called them both memberGroup (which had labels and data values of yes and no) and i dont jknow whats going on there???This is what my form emails me:
__________________________________________________
name: celia
zip: 12778
colour: blueish green
FRadioButtonGroupClass: [type Function]
memberGroup: [object Object]
FRadioButtonClass: [type Function]
email: niinn@nanna.com
FUIComponentClass: [type Function]
__________________________________________________
Ive searched and searched forums and read MM tutorials but cant understand what is happening.
Is anyone able to explain the following:
2)what is the variable names of components? is it memberGroup (for my above example)?
1)getValue & getData? How do i use these. Can anyone give me examples.
Basically, the above is all my form consists of.
Thanks in advance for anyones patience in explaining this to me and helping me here
Francesca
Adjusting Values Derived Form Stage Position
I've built a Flash movie which includes a section with three interactive sliders.
It is possible to drag each slider between '0' and a maximum which is related to the position of the other two sliders. It is only possible to drag each slider to its absolute maximum if the other two sliders are both set to '0'.
All three tracks are the same length in pixels but the values they represent are different - Track A is 0-500, Track B is 0-1000 and Track C is 0-400 (these maximums could be subject to change). Next to each track is a numerical read out of the 'value' of the slider.
There are three pre-set states for the sliders where there positions are set using the numerical value. From this point it is possible to drag each slider individually.
The problem I have is because the length of the track is only 184 pixels long (this can't be changed) when I drag the sliders manually there are situations where when I slider reaches it's maximum value dependant upon the other two sliders the actual value shown is one or two units short of what it should be.
Switching from Math.round to Math.ceil in the ActionScript that connects to positions of the sliders to the values displayed has improved matters, but obviously on the Track that goes from 0-1000 each pixel is a 5 or 6 unit change in value which means that when the slider reaches it's maximum dependant on the other sliders the value displayed can be up to 3 units short of what it should be.
Can anyone suggest a method by which when a slider hits a maximum imposed by the position of the other two sliders the value displayed is automatically adjusted to give the true maximum value (based on the other two values shown) and not the one dependant upon the track position of the slider?
Thanks and sorry for the long and involved post!
Trying To Pass Text From Form Text Field To A Flash Dynamic Text Field
Hi, I was hoping someone might enlighten me as to how/if I can do this...
Currently I'm using javascript which works fine to pass text from textfield A to textfield B:
Code:
window.onload=function()
{
document.forms.form1.shirtText.value=document.forms.form1.KitGroupID_16_TextOption_38.value
}
Is there a way to pass the textfield A text to a dynamic text input (flash) as I'd like to use the font embedding flash offers. I can make it work when loading a value from a txt file but I'm not sure how to access the value identified above as KitGroupID_16_TextOption_38 and make it appear in a dynamic input box. Eventually I might want to have 3 font choices for the user but I'd like to just see if I can get this working properly first.
Your help/advice would be greatly appreciated,
-Scott
Tab Key To Next Form Field
I have a form-like interface. I want to polish it off by setting it up to allow the user to press the tab key to advance to the next input text field. It seems that there should be a tutorial for this, but I can't find one. Any suggestions?
Form Field
Hi
How do I apply a script like this to a Form text-field?
<input type="text" value="Newsletter" onFocus="clearText(this)">
This javascript is placed in the header of the HTML-file
<script>
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}
</script>
The script empties the textfield as the user clicks it!
The textfield has the varible letterField applied to it in the Flash-file.
Lars
Form Field Value And No Value
How can I do this in flash. You know how in html forms you can do this:
PHP Code:
onblur="this.value='enter email address';" onfocus="this.value='';"
What I have are some form fields that have some text in it as a defalut value then when the person sets focus in the form field the value disappears. Now if the place a value in the form field then move to the next form field thus losing focus on the first form field. I would like the info they input in there to remain there. But if nothing was placed show the default value. I know how to do it in html but not in flash. Pleez help. Would love to do some flash forms.
Field Focus In A Form
Hello, I have a form that contains a back button, when you click the back button the movie goes to frame one where data can be input again. What I am trying to do is get the form to focus on a certain field when it goes to frame one again. I have tried Selection.setFocus and it doesnt seem to be working. the form clip is a movie placed on _level0. This is the code I am using for the back button. What am I doing wrong?
on (release, keyPress "<Left>") {
gotoAndStop (1);
Selection.setFocus("_level0.fname");
Searcher
Form Field InFocus
Hello,
I have a form and want the first text entry field to be in focus when the flash movie loads. ie, when the user starts to type in, the cursor is already in the first box.
Thanks.....Rob
Single Field Form
i've got a script and form that works perfectly with .php
now i want to create a SIMPLE form with just one field that will collect email addresses from visitors (like a newsletter sign up type thing). all i need is a single input text field, a send button, and the script and .php to make it all work.
i thought i had it, but i can't get it to work at all. is there an easy way to do this or does someone have one already made and working that i can take a look at?
thanks,
Clint
Form Field Question
I have a form with three input fields... in frame one i would like to have buttons that direct the cursor to the appropriate field in subsequent frames.
example:
i have a three buttons
email, name, message...(they go to frame 2,3,4 respectively)
i would like to click the email button and have it go to the input text field that is for the email address...
or click name and go to name field
and so on...
i have the tab order correct where it tabs through correctly.
but when i click name... it still goes to the input field for email..
which is the one on top...
is this possible
Problem With Form Field
Hi all
I have a problem with a php flash form processor i downloaded from this website
the flash form works fine and i get the email with all the fields information...
but in the "comments" field of the form - set as multiline - if you hit the "enter" button while writing the text only the first line will arrive in the mail...the rest is ignored by the php form processing file...
can you help me solve this?
here is the php code used...
<?
/************************************************** ****
**
** Flash Mx PHP Mailer
**
** By - David Khundiashvili
************************************************** *****/
/************************************************** *****
Enter your site details below!
************************************************** *****/
// Enter your contact email address here
$adminaddress = youremail@yoursite.com;
// Enter the address of your website here include http://www.
$siteaddress =http://www.yourwebsite.com;
// Enter your company name or site name here
$sitename = "yourcompany";
/************************************************** *****
No need to change anything below ...
************************************************** *****/
$date = date("m/d/Y H:i:s");
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
if ($action != ""):
mail("$adminaddress","Info Request",
"A visitor at $sitename has left the following information
First Name: $fname
Last Name: $lname
Email: $email
Telephone: $telno
The visitor commented:
------------------------------
$comments
Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date","FROM:$adminaddress");
mail("$email","Thank You for visiting $sitename",
"Hi $fname,
Thank you for your interest in $sitename!
Cheers,
$sitename
$siteaddress","FROM:$adminaddress");
$sendresult = "Thank you for visiting <a href = "$siteaddress" target = "_blank"><u>$sitename</u></a>. You will receive a confirmation email shortly. ";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo "$send_answer";
endif;
?>
check the $comments field...the problem happens there...only the first line will be read but if you hit enter and type more all the other text will be ignored...
thanks!
Multi-field Form To Be Sent Via Asp
Hello!
I know that there are several tutorials that show how to make forms but I'm having a heck of a time making one work.
I need to create a form that has 10 input fields in it and have that info sent to an email address via asp.
Does anyone have a multi-field form along with an mail.asp that I can look at?
thanks!
Reseting Form Field
I've created a simple form with one input field for viewers to submit an email address to join a mailing list. It works great, the only problem is after they click the submit button, the input field (message) doesn't reset OR my dynamic text field (mailstatus) thanking them for joining. Can anyone help?
this is the actionscript for my button:
on (release) {
subject = "Mailing List";
this.loadVariables("http://www.djbreak.com/simplemail.php", "POST");
}
this is my php script:
<?php
$email ="breakgetnice@aol.com";
$subject = $HTTP_POST_VARS['subject'];
$message = $HTTP_POST_VARS['message'];
mail($email, $subject, $message);
echo "mailstatus=Thank you for joining!&thescript=done&";
?>
Why This Form Field Does Not Work
i set up text feld set it to dynamic
then attached the scroll bar
and still i can not see the scroll bar just the whitefield where the scroll should be
can someone tell me what i am doing ewrong
Only 1st Field In Form Clears
Hello and thank you.
I am using Flash 8 to make an email form.
I have 5 fields but only the first field clears when you click
on the clear button.
This is the action script that I have. Any ideas?
on (rollOver) {
gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
gotoAndPlay("s2");
}
on (release) {
_parent.your_name="Name:";
_parent.your_phone="Phone:";
_parent.your_email="Email:";
_parent.your_weddingdate="Wedding Date:";
_parent.your_message="Message:";
}
Flash Form Field To ASP
I am using cs2 (flash 8 action script 2).
I want to take a field and send it to an asp page to use the information for a search.
It seems to recieve it in the asp page, (only it is huge---literally-see attached)
The field is named Qzip
My Flash Action Script is:
on (release) {
getURL("http://www.4manscramble.net/content/courses/search.asp", "_self", "POST");
}
My asp code isnote this is the basics as the real search is a ton of trig code)
strZIPCode = Request("Qzip")
If strZIPCode = "" then
Response.Write "<font color=red >We are sorry the zipcode wasn't read right. We have sent this issue to our team. Feel free to try again</font>"
strZIPCode = "44024"
Else
Response.Write "the zipcode is: "&strZipCode&""
End If
DatabaseQuery = "SELECT Latitude, Longitude FROM ZIPCodes WHERE ZIPCode =" & strZIPCode & " "
Response.Write ("<br>The Query ="&DatabaseQuery&"<br>")
Dim rsZIPCodes: Set rsZIPCodes = CreateObject("ADODB.Recordset")
rsZIPCodes.Open DatabaseQuery, dbConn
If rsZIPCodes.EOF Then
'ZIP Code does not exist - report to user...
Response.Write "<font color=red >We could not find that zip code. Feel free to try again</font>"
Else
do the search
//////////////////////////
at this point it seems the data passed but reall it hasn't.
If I use a regular form text field. No problem
Drop-down Form Field In AS3
Hey all,
Is it possible to make a drop-down form field w/in AS3? I don't need to send any data externally or anything -- so I don't need (I assume) any PHP code.
The selected value from the field is simply going to change a variable in the timeline.
Thx
|