473,396 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Variables not being sent using send() or sendAndLoad()

9
Hi, I have a form set up in flash pointing to a PHP script on my webspace.

I checked the PHP script and when viewed in a browser it returns the parameters OK so I presume it is working.

My problem is the variables captured by user input are not being sent to me.

Please can anyone check my actionscript below for errors.

I have tried send() and sendAndLoad() so I feel I may have an issue with my LoadVars.

Thanks in advance.

stop();

var fullName:TextField;
var fullAddress:TextField;
var postcode:TextField;
var telNumber:TextField;
var emailAddress:TextField;

fullName.restrict = "A-Za-zÁáÉéêíÍãõç ";
fullName.maxChars = 40;

fullAddress.restrict = "0-9A-Za-zÁáÉéêíÍãõç!?.+\- ";
fullAddress.maxChars = 90;

postcode.restrict = "0-9A-Za-zÁáÉéêíÍãõç!?.+\- ";
postcode.maxChars = 10;

telNumber.restrict = "0-9A-Za-zÁáÉéêíÍãõç!?.+\- ";
telNumber.maxChars = 20;

emailAddress.restrict = "0-9A-Za-zÁáÉéêíÍãõç!?.+\- ";
emailAddress.maxChars = 50;

function sendEmail(fullName, fullAddress, postcode, telNumber, emailAddress)
{
var myData:LoadVars = new LoadVars();
myData.fullName = fullName.text;
myData.fullAddress = fullAddress.text;
myData.postcode = postcode.text;
myData.telNumber = telNumber.text;
myData.emailAddress = emailAddress.text;
}
this.submitButton.onRelease = function()
{
if (fullName.text == "" || fullAddress.text == "" || postcode.text == "" || telNumber.text == "")
{
gotoAndStop("error");
}

else

{
sendEmail();
gotoAndStop("correct");
}

myData.send("http://www.mywebsite.co.uk/iopost.php", "POST");
};
Oct 20 '07 #1
0 1706

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Sugapablo | last post by:
I have a dynamic form that that creates input variables named different things based on what it reads from the database. So, for example, it may create three fields, named ex12, ex23, and ex45...
3
by: Robert | last post by:
Hello, Can anyone help with this? On my online order form, I need to send a few variables to my credit-card processor. These variables are for non-secure customer comments, and will be sent...
15
by: Thomas Scheiderich | last post by:
I am trying to understand Session variables and ran into a question on how they work with data that is passed. I have an HTM file that calls an ASP file and sends the name either by GET or POST....
4
by: JA | last post by:
I have this little tell-a-friend script that will send out a link back to the site. I want to put a link on my product pages that will go to the script, and have the script display the product...
2
by: William Gower | last post by:
I am creating an email message to be sent from a web page. How do I embed variables like strFirstName, strLastName etc. into the body I would like it to say. Last Name : strLastName ...
7
by: Ryan | last post by:
Ok.. here's my situation. I have a program that handles a database full of people. Users of the program have the ability to send out notifications to these people. Pretty standard notifications,...
0
by: cytan7411 | last post by:
Hello, I have a website up and includes two textboxes and a button. It is basically a front-end system to log into a 3rd parties PHP script. I have uploaded the flash source to...
7
by: David | last post by:
i think i just realized i'm an idiot. again. (not syntactically correct code... just pieces to illustrate) class StateObject { members like socket, receiveBuffer, receiveBufferSize,...
0
by: bbacarat | last post by:
Hi All, I attempting to use the following actionscript and php code to send from a flash form that I have created. However I have used a combo box from the built in flash 8 components and I'm...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.