jeroen0078
Gebruiker
- Lid geworden
- 26 jan 2006
- Berichten
- 28
ik zou graag een formulier maken waarop een een print knop staat maar vooraleer dat hij print moet de checkbox aangevinkt worden. Dit laatste lukt dus niet met devolgende code. Het printen lukt dat is geen probleem
kan iemand helpen
groeten
jeroen
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
function validate(form) {
if(!document.form1.agree.checked){alert("Eerst kalender invullen a.u.b.");
return false; }
return true;
}
</script>
</head>
<body>
<table border='0' width='50%' cellspacing='0' cellpadding='0' ><form name=form1 action=action_page.php onprint='return validate(this)'><input type=hidden name=todo value=post>
<tr bgcolor='#ffffff'><td align=center > </td>
</tr>
<tr><td align=center bgcolor='#f1f1f1'><font face='verdana' size='2'><input type=checkbox name=agree value='yes'>Kalender ingevuld</td></tr>
<tr bgcolor='#ffffff'>
<td align=center ><input name="print" type="button" id="print"
onclick="window.print()" value=" Print this page " /></td>
</tr>
</table></form>
</body>
</html>
kan iemand helpen
groeten
jeroen
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
function validate(form) {
if(!document.form1.agree.checked){alert("Eerst kalender invullen a.u.b.");
return false; }
return true;
}
</script>
</head>
<body>
<table border='0' width='50%' cellspacing='0' cellpadding='0' ><form name=form1 action=action_page.php onprint='return validate(this)'><input type=hidden name=todo value=post>
<tr bgcolor='#ffffff'><td align=center > </td>
</tr>
<tr><td align=center bgcolor='#f1f1f1'><font face='verdana' size='2'><input type=checkbox name=agree value='yes'>Kalender ingevuld</td></tr>
<tr bgcolor='#ffffff'>
<td align=center ><input name="print" type="button" id="print"
onclick="window.print()" value=" Print this page " /></td>
</tr>
</table></form>
</body>
</html>