WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Flash Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Flash Discussion Forum Flash design presents a limitless number of possibilities for your sites and designs. Discuss your Flash ideas, questions and issues here.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-17-2007, 12:58 PM
dbh_21 dbh_21 is offline
WebProWorld Member
 

Join Date: Nov 2003
Posts: 35
dbh_21 RepRank 0
Default Please help with my email validation in flash!

Trying to get the email validation working so it detects correct sytax... ANy ideas?
Thanks in advance:



email_txt.restrict = "a-z_.@0-9";
email_txt.maxChars = 40;

status_txt.text = '';

submit_btn.onRelease = function()
{
var email = email_txt.text;

// are all the fields filled?
if (email == '') {
status_txt.text = "Enter Your Email";
return;
}


// yes, all fields filled
sendEmail(email);

// sending data...
status_txt.text = "Processing...";

// prevent submitting again by disabling the button
this.enabled = true;
};


function sendEmail(email)
{
var myData = new LoadVars();

myData.email = email;

myData.onLoad = function(ok) {
if (ok) {
status_txt.text = this.message;
} else {
status_txt.text = "Try Again Later";
}
submit_btn.enabled = true;
};

myData.sendAndLoad('contactform.php', myData, 'POST');
}
Reply With Quote
  #2 (permalink)  
Old 10-19-2007, 11:27 PM
joshjones joshjones is offline
WebProWorld Member
 

Join Date: Sep 2006
Posts: 29
joshjones RepRank 0
Default Re: Please help with my email validation in flash!

try something like this

//set your email varable
Email = your email variable;

//if it's a correct email, then send it
if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {

//it's got a problem, show an error message here


} else {


// it's correct, do your sending stuff here


}
__________________
____________________________
"surfing isn't just about riding down a wave, but the experience, motion, aesthetics, views, sounds, and sensations."
Level Four Storefront
Reply With Quote
Reply

  WebProWorld > Site Design > Flash Discussion Forum
Tags: email, flash, help, validation



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Email spam bots - display name vs. actual email address apalmer123@msn.com Web Programming Discussion Forum 25 09-04-2007 01:13 PM
Form validation for the email field, using formmail script. darren13 Web Programming Discussion Forum 1 04-28-2006 02:00 AM
php email validation jmdb71 Web Programming Discussion Forum 1 05-29-2004 02:11 AM
Email FLASH gwsoccer14 Marketing Strategies Discussion Forum 0 05-25-2004 12:14 PM
WC3 validation of flash movie... bizzydint Flash Discussion Forum 5 01-28-2004 01:37 AM


Search Engine Friendly URLs by vBSEO 3.0.0