nuthead
06-30-2003, 11:53 AM
I cant figure this one out...
This is the code i have so far:
function checkForm(frm) {
if (frm.1.value != "") {
msg += frm.1.value+",";
}
if (frm.2.value != "") {
msg += frm.2.value+",";
}
if (frm.3.value != "") {
msg += frm.3.value+",";
}
parent.forms['smsform'].to.value = msg;
window.close();
}
Now this is meant to check the value of 3 checkboxes (called 1,2 and 3) and if they have a value it should write it to the variable "msg". Then it is meant to pass it to the parent window (the form name is smsform) to the text box called "to".
I can't see anything wrong with this, the only thing is I have this function in the body of the script, after the form itself, is this a problem?
This is the code i have so far:
function checkForm(frm) {
if (frm.1.value != "") {
msg += frm.1.value+",";
}
if (frm.2.value != "") {
msg += frm.2.value+",";
}
if (frm.3.value != "") {
msg += frm.3.value+",";
}
parent.forms['smsform'].to.value = msg;
window.close();
}
Now this is meant to check the value of 3 checkboxes (called 1,2 and 3) and if they have a value it should write it to the variable "msg". Then it is meant to pass it to the parent window (the form name is smsform) to the text box called "to".
I can't see anything wrong with this, the only thing is I have this function in the body of the script, after the form itself, is this a problem?