<html> <head> <script language=javascript> function validate(chk){ if (chk.checked == 1) window.location='newpage.php'; else alert("You have to agree"); } </script> </head> <body> <form onsubmit="validate(chk1);return false"> <input type='checkbox' name='chk1' /> Agree<br /> <input type='image' src='images/continue.jpg' align='right' /> </form> </body> </html>