473,657 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

9 New Member
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:TextFi eld;
var fullAddress:Tex tField;
var postcode:TextFi eld;
var telNumber:TextF ield;
var emailAddress:Te xtField;

fullName.restri ct = "A-Za-zÁáÉéêíÍãõç ";
fullName.maxCha rs = 40;

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

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

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

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

function sendEmail(fullN ame, fullAddress, postcode, telNumber, emailAddress)
{
var myData:LoadVars = new LoadVars();
myData.fullName = fullName.text;
myData.fullAddr ess = fullAddress.tex t;
myData.postcode = postcode.text;
myData.telNumbe r = telNumber.text;
myData.emailAdd ress = emailAddress.te xt;
}
this.submitButt on.onRelease = function()
{
if (fullName.text == "" || fullAddress.tex t == "" || postcode.text == "" || telNumber.text == "")
{
gotoAndStop("er ror");
}

else

{
sendEmail();
gotoAndStop("co rrect");
}

myData.send("ht tp://www.mywebsite.c o.uk/iopost.php", "POST");
};
Oct 20 '07 #1
0 1727

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

Similar topics

4
17218
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 respectively, and send those fields and their values via POST to a PHP page. So these would be sent basically: $_POST which may equal "cow". $_POST which may equal "cat".
3
2509
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 through the usual metod, i.e., <form action="https://orderpage.ic3.com/hop/orderform.jsp" method="post">
15
3120
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. When I find is that if I send the value by the GET method, response.write("From QueryString: " & Request.QueryString("usernamefromform") & "<br><br>")
4
1694
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 name, and have the product name in the email that goes out, along with a link back to the product page, instead of just to the general site, and then have the Thank You page include a link back to the product. I put it up as a project on a...
2
2085
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 ex. Gower First Name: strFirstName ex. Bill Dim strFirstName As String = CType(Request.QueryString("FirstName"), String)
7
4182
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, the program tracks when notifications are sent out and who sends them. Currently these notifications are all sent via email. Now the program users also want the ability to send these notifications via standard snail mail. (I'll make a popup...
0
1621
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 http://www.allcheck.biz/flash.7z. I know that the two variables the PHP script is looking for is called userName and password. I attempted to use the sendAndLoad(); function, but it won't even leave the flash page. Any help is greatly appreciated!!
7
1953
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, StringBuilder etc.. }
0
2969
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 not getting the emails through with the data that is being selected in the combo box. I've attempted to create the code I think would extract this information but I'm not having much look? Also I've attempted to add in a carboncopy email address...
0
8306
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7327
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.