Please help with basic javascript question...
Hi all,
After much search finally found this on a forum:
Question:
"I have 4 checkboxes (named box1, box2 , box3 and box4) and I need to send
the user to one page if only boxes 1 and 2 are checked and to another page
if any other combinations are checked."
Answer:
"if (theForm.box1.checked && theForm.box2.checked && !theForm.box3.checked &&
!theForm.box4.checked)
window.location.href = "Page1.htm"
else
window.location.href = "Page2.htm""
****
Now my question: How should the full, working javascript look? (I mean the whole thing starting with <script language="JavaScript"><!-- and ending with //--></script>) ?
How do I call the script in form tag, onsubmit?
Many thanks...