我正在尝试调试在 Flash 中构建的联系表单,但我不确定如何进行调试。从 ActionScript 中,我可以看出它应该将结果发布到 /assets/files/functions.php。问题是,当我填写字段并单击“发送”(应该会触发此操作)时,什么也没有发生,我无法判断这是 PHP 问题还是 Flash 问题。
关于如何调试这个有什么想法吗?
可在此处找到该网站,点击“连接”,然后点击“发送查询”即可查看表格。
代码如下:
lvOut = new LoadVars(); //create lv object
lvIn = new LoadVars(); //create lv object
lvIn.onLoad = function (success) {
if(success){
gotoAndPlay("success");
}else{
gotoAndPlay("failure");
}
}
function submit() {
if ( (inputName.text != "") && (inputAddress.text != "") && (inputCity.text != "") && (inputState.text != "")
&& (inputCountry.text != "") && (inputTelephone.text != "") && (inputEmail.text != "") ) {
lvOut.input_name = inputName.text;
lvOut.input_address = inputAddress.text;
lvOut.input_city = inputCity.text;
lvOut.input_state = inputState.text;
lvOut.input_zip = inputZip.text;
lvOut.input_country = inputCountry.text;
lvOut.input_telephone = inputTelephone.text;
lvOut.input_email = inputEmail.text;
lvOut.input_bedrooms = inputBedrooms.text;
lvOut.input_realtor = inputRealtor.text;
lvOut.input_comments = inputComments.text;
if (realtorYes) {
lvOut.input_hasRealtor = "yes";
} else if (realtorNo) {
lvOut.input_hasRealtor = "no";
} else {
lvOut.input_hasRealtor = "no answer";
}
//send vars to functions page and load in result
lvOut.sendAndLoad("assets/files/functions.php", lvIn, "POST");
}
}
btnSend.addEventListener("click", submit);
请尽可能帮助我!:-)