Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / March 2008



Tip: Looking for answers? Try searching our database.

LoadVars works but status bar says data loading

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gigasaurus - 31 Mar 2008 11:26 GMT
I am using LoadVars to pass form data to a php page that sends an email.
Everything seems to work, and the php page successfully returns sent=ok, but
the status bar at the bottom continues to say "transferring data from..."

Could someone please help me figure out how to fix that?

I'll put a link below to my example, as well as example code.

Thankyou

http://bigfins.com/php/form01.html

stop();
var message:LoadVars = new LoadVars();
var messageSent:LoadVars = new LoadVars();
function checkForm():Boolean {
    var missing:Boolean=false;
    error_firstname_txt.text = error_lastname_txt.text = error_email_txt.text =
"";
    if (firstname_txt.text == ""){
        error_firstname_txt.text = "first name required";
        missing = true;
    }
        if (lastname_txt.text == ""){
        error_lastname_txt.text = "last name required";
        missing = true;
    }
            if (email_txt.text.indexOf("@") == -1){
        error_email_txt.text = "valid email required";
        missing = true;
    }
    // if missing is true, return false - else return true
    return missing ? false : true;   
};

function sendMessage():Void {
    var formOK:Boolean = checkForm();
    if (formOK) {
        message.firstname = firstname_txt.text;
        message.lastname = lastname_txt.text;
        message.email = email_txt.text;
        message.sendAndLoad("form01email.php?cachekiller="+ new Date().getTime(),
messageSent);
        gotoAndStop("send");
    };
};

submit_btn.onRelease = sendMessage;

function backToForm():Void {
    gotoAndStop("theForm");
};

messageSent.onLoad = function() {
    if (this.sent == "OK") {
        gotoAndStop("thankyou");
    } else {
        gotoAndStop("fail");
        failure_txt.text = this.reason;
    }
};
GWD - 31 Mar 2008 15:57 GMT
That's just in Firefox, I presume. Haven't seen it in other browsers.

There's a workaround here, although I've not tried it yet myself.:
http://board.flashkit.com/board/showthread.php?t=759308
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.