|
-
Mar 23rd, 2002, 10:55 AM
#1
Thread Starter
Hyperactive Member
Please Help...
Hey All,
This is what I need to do:
(It has to do with form validation)
I first want to check that a variable is equal to the string: "CONFIRM CHECKED", if it is, continue the function, if not, display an alert message. Then I want it to check that two fields are not equal to each other: if dis_frm.egold.value == dis_frm.referrer.value...
This is what I have, but it's seriously wrong.
function checkIt(el){
var chkd=""
for(var i=0; i<el.length; i++)
if (el[i].type=="checkbox" && el[i].checked) chkd+=el[i].name;
if (chkd!="CONFIRM CHECKED"){
alert("Please check all boxes");
return;
}
if (dis_frm.egold.value == dis_frm.referrer.value){
alert("You cannot refer yourself");
return;
}
else
document.forms["dis_frm"].submit();
dis_frm.sub.value = "Loading...";
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|