logo-dw

Go Back   Dreamweaver Club Forums > Graphic Design > Flash
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10-07-2010, 04:45 PM   #1
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default Flash Question

Guys, I am working on the code for a contact form in flash. I don't get any errors, but, I can't get the code to do certain things. The code shows the "thank you for inquiry" within the "status" box but it will not show when an e-mail, name or comments" are not input. Can someone please tell me what I'm doing wrong? Here's the code. Thanks
HTML Code:
bSubmit.onRelease = function()
{
	email();
}
function email()
{
	
	var sMessage = "Name: " + tName.text + "\nEmail: " + tEmail.text + "\nPhone: " + tPhone.text + "\nComments: " + tComments.text;
	lvSend = new LoadVars();
	lvReply = new LoadVars();
	lvSend.msg = sMessage;
	lvSend.address = "info@test.com"; 
	tName.text = "";
	tEmail.text = "";
	tPhone.text = "";
	tComments.text = "";
	
	lvReply.onLoad()
	status.text = "Sending Message...";
	{
			status.text = "Thank your for your inquiry.";
	}
	lvSend.sendAndLoad('send_mail.php', lvReply, 'POST');
	
}

function formValidationChecks(){
if ((!Email.text.length) || (Email.text.indexOf("@") == -1) || (Email.text.indexOf(".") == -1)) {
status.text = "Please enter a valid E-mail address";
return false;
} else if (!tName.text.length) {
status.text = "Please enter Your Name";
return false;
} else if (!tphone.text.length) {
status.text = "Please enter Your Telephone";
return false;
} else if (!tComments.text.length) {
status.text = "Please Enter Your Message";
return false;
}
return true;
}
gigiloumill is offline   Reply With Quote
Old 10-08-2010, 07:51 PM   #2
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default

wow, no flash peeps here...lol
gigiloumill is offline   Reply With Quote
Old 10-09-2010, 01:12 AM   #3
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

the validation is javascript no? did you not write that?
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 10-09-2010, 02:47 AM   #4
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default

is flash..
gigiloumill is offline   Reply With Quote
Old 10-09-2010, 03:45 AM   #5
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

ok right. you may have a wait not so many members use actionscript for validation i think
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 10-09-2010, 05:04 AM   #6
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

looking at it although i know nothing, i would say it was calling the email function on release but not the validation

bSubmit.onRelease = function()
{
email();
}
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 10-09-2010, 11:53 AM   #7
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default

I know, I tried rewriting with this but, it only validates the email and name and then it stops...

Code:
bSubmit.onRelease = function()
{
  if( formValidationChecks()  == true)  email();
}
gigiloumill is offline   Reply With Quote
Old 10-09-2010, 01:49 PM   #8
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default

Never mind e, I did it in a different form. Now it works perfect..Thanks
gigiloumill is offline   Reply With Quote
Old 10-09-2010, 04:08 PM   #9
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Quote:
Originally Posted by gigiloumill View Post
wow, no flash peeps here...lol
Steve Jobs says we aren't allowed
Corrosive is offline   Reply With Quote
Reply


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

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

Forum Jump


All times are GMT. The time now is 10:07 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com