Guys the code below is driving me nuts!
What the code is supposed to do is when a submit button is clicked the data collected in the flash movie is passed to an ASP page where the data is checked and validated to make sure that the correct number of entries have been passed to the page if not the page returns result=0 (false) otherwise the page returns result=1 true the problem I am have is that the flash movie I am using will not read the result variable from the page This code worked fairly well with PHP unfortunately I have had to move to ASP and I have converted the serverside stuff ok but the link between the two has been lost. I have posted the code below any suggestions are gratefully recieved.
function submitButton_fn() {
trace("submitButton");
this._parent.dataCollector = new LoadVars();
dataCollector.onLoad = function($sucess) {
trace($sucess);
for (i=1; i<=6; i++) {
_root["page"+i]._visible = false;
}
_root.submitted._visible = true;
_root.prev_btn._visible = false;
_root.submit_btn._visible = false;
if (parseInt(this.result) == 1) {
_root.submitted.text = "Your form has been submitted.";
//+newline+this.sql+newline+"result="+this.result;
} else {
_root.submitted.text = "Your form has not been submitted. Please try again later.";
//+newline+this.sql+newline+"result="+this.result;
}
};
collectData();
for (a in this._parent.dataCollector) {
trace(a+"="+this._parent.dataCollector[a]);
}
this._parent.dataCollector.sendAndLoad("postformmailer.asp", this._parent.dataCollector, "POST");
}
THe Start of wisdom is to realise you know nothing. I'll be a genius then!
What the code is supposed to do is when a submit button is clicked the data collected in the flash movie is passed to an ASP page where the data is checked and validated to make sure that the correct number of entries have been passed to the page if not the page returns result=0 (false) otherwise the page returns result=1 true the problem I am have is that the flash movie I am using will not read the result variable from the page This code worked fairly well with PHP unfortunately I have had to move to ASP and I have converted the serverside stuff ok but the link between the two has been lost. I have posted the code below any suggestions are gratefully recieved.
function submitButton_fn() {
trace("submitButton");
this._parent.dataCollector = new LoadVars();
dataCollector.onLoad = function($sucess) {
trace($sucess);
for (i=1; i<=6; i++) {
_root["page"+i]._visible = false;
}
_root.submitted._visible = true;
_root.prev_btn._visible = false;
_root.submit_btn._visible = false;
if (parseInt(this.result) == 1) {
_root.submitted.text = "Your form has been submitted.";
//+newline+this.sql+newline+"result="+this.result;
} else {
_root.submitted.text = "Your form has not been submitted. Please try again later.";
//+newline+this.sql+newline+"result="+this.result;
}
};
collectData();
for (a in this._parent.dataCollector) {
trace(a+"="+this._parent.dataCollector[a]);
}
this._parent.dataCollector.sendAndLoad("postformmailer.asp", this._parent.dataCollector, "POST");
}
THe Start of wisdom is to realise you know nothing. I'll be a genius then!