LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 


Prev Previous Post   Next Post Next
  #1  
Old 10-04-2007, 02:30 AM
Ultra Ultra is offline
Registered User
 
Join Date: Jun 2007
Posts: 40
Rep Power: 0
Ultra is on a distinguished road
Checking a variable...

Hi,

I've created a php email form which works fine, and I have action script attached on the 'submit' button which checks for certain values in the input fields..

There are only 3 input fields:

1. Name field - variable assigned = 'name_input' - Input text / single line
2. email field - variable assigned = 'email' - Input text / single line
3. Message field - variable assigned = 'message_input' - Input text / multi line

All input text field are located in a movieclip called 'form'.

Now, on the send button i check if certain criteria is met...



Actionscript:
on(release){
	if ((_parent.form.name_input.length<1) or (_parent.form.message_input.length<1)) {
		_parent.error_message.gotoAndPlay("s1");
	}
	else{
		_parent.form.loadVariables("email.php", "POST");
	}
}
--> I cut this code down a little bit because the rest of the code works but those two conditions are just not checked by flash...

Even if I leave both the Name and Message field empty it will still send the message and not (as it should) go and play the error message...

What am I doing wrong here ?

As always, thanx for your help and advise in advance !

Mike
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
using value of a variable as a variable name jhatpat ActionScript 3.0 2 01-26-2009 04:36 AM
Editing Template error(convert from .fla to .swf) Travi$18 Flash CS3 / Flash 9 2 09-03-2008 06:43 PM
2D Physics Engine Scottae Members Cafe 11 07-24-2008 04:36 PM
Dynamic Text - change text box variable on click kenisswell Flash MX ActionScript 10 11-01-2005 09:20 PM
incrementing a variable and checking it against another Ultraniblet Flash MX ActionScript 7 03-11-2003 04:47 PM




All times are GMT. The time now is 05:35 PM.