I want a script to check if a form's check box is checked before it pops up a page
How will in combine this two scripts.
<script LANGUAGE="JavaScript">
<!--
function ValidateForm(form){
ErrorText= "";
if ( form.agree.checked == false ) { alert ( "Please check the Terms & Conditions box." ); return false; }
if (ErrorText= "") { form.submit() }
}
-->
</script>
<script>
//pop-up window for preview
function popup() {
win = window.open('','myWin','width=578,height=204,scrollbars=yes,resizeable=yes');
document.post.action='div.php';
document.post.target='myWin';
document.post.submit();
document.post.action='default.php';
document.post.target='_self';
}
</script>