
Welcome Guest
|
#1
|
|||
|
|||
|
So I've posted this in a couple of other places with no luck
![]() So my sendAndLoad won't work in FireFox(Win) or Safari. From what I have read, "there's a problem with the Flash 8 plugin for Firefox." This would explain why when in Firefox(Win) my swf won't return data from the server. I specity (Win) becuase if works fine on a Firefox(Mac). The idea behind my project is that it's supposed to collect data through a form in the swf, send it to an external validator which returns either an errors array or the ok to go to the next frame, a thank you. I've tested it in a number of browsers and so far the only two it won't work in are Firefox(Win) and Safari. How can I adapt my code so that it works? I'm pretty sure my boss is about to fire me cause I can't get this project done. Thanks for any and all help in advance! -------------- Actionscript:
submitURL = "http://santriodemo.com/handlesubmitqb.asp";
//function to submit form data
function onSubmit() {
// Create a new LoadVars instance for the form data
formData = new LoadVars();
// Initialize send variables:
formData.fName = "";
formData.title = "";
formData.cName = "";
formData.email = "";
formData.phone = "";
formData.ext = "";
// Gather the order information into a LoadVars instance.
formData.fName = fName;
formData.title = title;
formData.cName = cName;
formData.email = email;
formData.phone = phone;
formData.ext = ext;
// Create another LoadVars instance to receive the server's reply
replyData = new LoadVars();
// Initialize reply variables.
replyData.currErrorNum = "";
replyData.errFlag = "";
// Specify a function to call when the reply is received.
replyData.onLoad = handleReply;
// Submit the form data.
formData.sendAndLoad(submitURL, replyData, "post"); <------- PROBLEM!!!
// Tell the user what's happening.
message_txt.text = "loading...";
}
//function to display either a list of errors or a thank you.
function handleReply(success) {
if (success) {
var error = new Array();
error[0] = replyData.error0;
error[1] = replyData.error1;
error[2] = replyData.error2;
error[3] = replyData.error3;
error[4] = replyData.error4;
error[5] = replyData.error5;
error[6] = replyData.error6;
if (replyData.errFlag == "True") {
//there were errors; display the list.
errors.gotoAndStop(2);
for (k=0; k<replyData.currErrorNum; k++) {
errors.errorList += (error[k] add "<br>");
}
} else {
//there were no errors; go to thank you page.
gotoAndStop("thanks");
}
message_txt.text = "errFlag: " + replyData.errFlag + newline;
message_txt.text += "currErrorNum: " + replyData.currErrorNum + newline;
message_txt.text += "fname: " + replyData.fName + newline;
message_txt.text += "title: " + replyData.title + newline;
message_txt.text += "cname: " + replyData.cName + newline;
message_txt.text += "email: " + replyData.email + newline;
message_txt.text += "phone: " + replyData.phone + newline;
message_txt.text += "ext: " + replyData.ext + newline;
message_txt.text += "error0: " + replyData.error0 + newline;
message_txt.text += "error1: " + replyData.error1 + newline;
message_txt.text += "error2: " + replyData.error2;
} else {
message_txt.text = "There was a problem connecting to the server.";
}
}PS message_txt is only to help me see that things are working right and is not viewable in the final doc Last edited by [PAUL FERRIE] : 07-07-2006 at 06:02 AM |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mail with LoadVars and php, help... | yodaa | Flash Media Server |
0 | 04-25-2005 11:44 PM |
| caching jpgs by loading into loadVars | Ultraniblet | Flash MX ActionScript |
6 | 03-20-2004 03:52 AM |
| saving LoadVars() object in a sharedObject | SnakeO | Flash MX ActionScript |
0 | 12-03-2003 04:41 PM |
| LoadVars - PLEASE HELP | ScotterMonk | Flash MX ActionScript |
5 | 10-15-2003 02:24 PM |
| LoadVars(): Mac vs Windows | Lefevre | Flash Media Server |
2 | 01-29-2003 03:06 PM |





