Hi Folks,
I have what, I hope, is a simple problem. I am using the simple form validation script from here to have a form be completed before sending. My problem is that I want to bring my user to a thank you page when the completed form gets emailed. How and where would I implement this feature. I am doing something wrong because the page just sits there showing the completed form, even tho it DOES send the email.
<script language="javascript">
function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements;
if (tempobj.name.substring(0,4)=="Cust") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
}
if (!pass) {
shortFieldName=tempobj.name.substring(4,30).toUpperCase();
alert("Please make sure the "+shortFieldName+" field was properly completed.");
return false;
}
else {
document.location=("http://216.97.22.73/livemusic-music/thankyou.shtml")
}
return true;
}
</script>
Someone please help me... I am seeing this code in my sleep and that just scares me!!
Ziggy
I have what, I hope, is a simple problem. I am using the simple form validation script from here to have a form be completed before sending. My problem is that I want to bring my user to a thank you page when the completed form gets emailed. How and where would I implement this feature. I am doing something wrong because the page just sits there showing the completed form, even tho it DOES send the email.
<script language="javascript">
function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements;
if (tempobj.name.substring(0,4)=="Cust") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
}
if (!pass) {
shortFieldName=tempobj.name.substring(4,30).toUpperCase();
alert("Please make sure the "+shortFieldName+" field was properly completed.");
return false;
}
else {
document.location=("http://216.97.22.73/livemusic-music/thankyou.shtml")
}
return true;
}
</script>
Someone please help me... I am seeing this code in my sleep and that just scares me!!
Ziggy