daveg92656
June 26th, 2003, 02:32 PM
Hi,
Im using FlashMX and have built a form for one page. however, i cannot get the AS to work properly. Any help or suggestions would be greatly appreciated. And I have already done many searches and read many threads in here on the subjects...
I have 4 layers: labels, code, text, components. I have put all the code on the first layer on the code layer. However, the reset button is not working properly and I cannot get the submit button to "Check" before going to "result".
Last, do all the actions go in the first frame of "code" layer or do they go with each button? thanks, here is the code on frame 1 of the code layer.
stop();
// the Textarea is empty, so no scrollbar
_root.bar._visible =false;
// onChanged function
comment.onChanged =function() {
if (this.maxscroll > 1) {
_root.bar._visible = true;
} else
_root.bar._visible =false;
} //end onChanged
//Reset button function
onReset = function () {
//text
name.text = "";
address.text = "";
city.text = "";
state.text = "";
zip.text = "";
email.text = "";
homePhone.text = "";
workPhone.text = "";
comment.text = "";
bar._visible = false;
} // end onReset function
onSubmit = function () {
if(!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
emailStatus ="Please enter a valid E-Mail address";
}
else if (!name.length) {
emailStatus = "Please enter your name before sending";
}
else if(!comment.length) {
emailStatus = "Please enter some text in your message";
}
texte = name.text;
text = address.text;
text = city.text;
text = state.text;
text = zip.text;
text = comment.text;
_root.gotoAndStop ("result");
}
onBack = function () {
gotoAndStop("form");
}
onSend = function () {
LoadVariablesNum("formScriptASP.aspx", "0", "POST");
}
thanks and sorry about the messy format. Dave.
:q:
Im using FlashMX and have built a form for one page. however, i cannot get the AS to work properly. Any help or suggestions would be greatly appreciated. And I have already done many searches and read many threads in here on the subjects...
I have 4 layers: labels, code, text, components. I have put all the code on the first layer on the code layer. However, the reset button is not working properly and I cannot get the submit button to "Check" before going to "result".
Last, do all the actions go in the first frame of "code" layer or do they go with each button? thanks, here is the code on frame 1 of the code layer.
stop();
// the Textarea is empty, so no scrollbar
_root.bar._visible =false;
// onChanged function
comment.onChanged =function() {
if (this.maxscroll > 1) {
_root.bar._visible = true;
} else
_root.bar._visible =false;
} //end onChanged
//Reset button function
onReset = function () {
//text
name.text = "";
address.text = "";
city.text = "";
state.text = "";
zip.text = "";
email.text = "";
homePhone.text = "";
workPhone.text = "";
comment.text = "";
bar._visible = false;
} // end onReset function
onSubmit = function () {
if(!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
emailStatus ="Please enter a valid E-Mail address";
}
else if (!name.length) {
emailStatus = "Please enter your name before sending";
}
else if(!comment.length) {
emailStatus = "Please enter some text in your message";
}
texte = name.text;
text = address.text;
text = city.text;
text = state.text;
text = zip.text;
text = comment.text;
_root.gotoAndStop ("result");
}
onBack = function () {
gotoAndStop("form");
}
onSend = function () {
LoadVariablesNum("formScriptASP.aspx", "0", "POST");
}
thanks and sorry about the messy format. Dave.
:q: