I have a contact form that connects to my site's back-end, the form submits just fine but I get no server response. It's always 'undefined'. I'm worried it may be because of this, but I was hoping maybe one of you smarter folks could help me find either a workaround or if it isn't because of that (note: most likely), then maybe you could tell me what I'm doing wrong.
//==========================================================
public function openForm():void {
//==========================================================
var sendForm:URLLoader = new URLLoader();
var newFile:FileReference = new FileReference();
var request:URLRequest = new URLRequest(urlString);
if (form1.planby.visible && form1.planby.upload.selected) {
newFile.addEventListener(HTTPStatusEvent.HTTP_STATUS, responseStatus);
newFile.upload(request, "attache[attachment]", false);
} else {
sendForm.addEventListener(HTTPStatusEvent.HTTP_STATUS, responseStatus);
sendForm.load(request);
}
}
//==========================================================
function responseStatus(e:HTTPStatusEvent):void {
//==========================================================
//e.status == "undefined" according to debugger
if (e.status == 200) {
openPage("success");
} else {
openPage("error");
}
}