Forum de discussion
Forum « Programmation Javascript » (archives)
Re: prompt pour imprimer
Envoyé: 10 février 2003, 9h10 par four
Est-ce que la fonction window.print() fait elle même un refresch de la page ?
Voici mon code, mais je n'ai vraiment pas trouvé l'erreur ! NB : il y a un refresh, mea culpa...
<body onLoad="alert('Actualisation')">
<div align="center">
<center>
<table border="0" width="340" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<p align="center"><b><font size="5"><img border="0" src="../pics/headerRH.gif"></font></b>
</td>
</tr>
</center>
<tr>
<td width="100%">
<p align="center">
<br> <b><font size="5">
AUS-WEITER-FORTBILDUNGSANTRAG</font></b><br>
<center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="top">
<table border="1" width="100%" bordercolor="#808080" cellspacing="0">
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="1">
<tr>
<td width="100%">
<font size="2" face="Verdana"><b><u>Antragsteller</u></b></font>
</td>
</tr>
<tr>
<td width="100%">
<div align="center">
<table border="0" cellspacing="1">
<tr>
<td align="left"><font size="2" face="Verdana">Name und Vorname</font></td>
<td align="center"><b><font size="2" face="Verdana">:</font></b></td>
<td align="left">
<p align="left"><font size="2" face="Verdana"><%=request.form("nom")%></font></p>
</td>
<td align="center" width="30"></td>
<td align="left"><font size="2" face="Verdana">Funktion</font></td>
<td align="center"><b><font size="2" face="Verdana">:</font></b></td>
<td align="left">
<p align="left"><font size="2" face="Verdana"><%=request.form("fct")%></font></td>
</tr>
<tr>
<td align="left"><font size="2" face="Verdana">Beschäftigungsgrad</font></td>
<td align="center"><b><font size="2" face="Verdana">:</font></b></td>
<td align="left">
<p align="left"><font size="2" face="Verdana"><b><%=request.form("taux")%>
%</b></font></td>
<td align="center" width="30"></td>
<td align="left"><font size="2" face="Verdana">Datum</font></td>
<td align="center"><b><font size="2" face="Verdana">:</font></b></td>
<td align="left">
<p align="left"><font size="2" face="Verdana"> <%=request.form("ladate")%></font>
</p>
</td>
</tr>
</table>
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<hr noshade size="1">
</td>
</tr>
<tr>
<td width="100%">
<p align="center"><b><font size="2" face="Verdana">Beschreibung des Kurses, der Schulung:</font></b></td>
</tr>
<tr>
<td width="100%">
<div align="center">
<center>
<table border="1" width="95%" cellspacing="0" cellpadding="3">
<tr>
<td width="100%" valign="top"><font size="2" face="Verdana">
<%=request.form("description")%>
</font></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="1">
<tr>
<td align="right"><font size="1" face="Verdana">Kursleitung :</font></td>
<td><font size="2" face="Verdana"><%=request.form("prof")%></font></td>
<td align="right"><font size="1" face="Verdana"> Ort :</font></td>
<td><font size="1" face="Verdana"><%=request.form("lieu")%></font></td>
<td align="right"><font size="1" face="Verdana">Daten der Fortbildung
:</font></td>
<td><font size="1" face="Verdana"><%=request.form("datecours")%></font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<hr noshade size="1">
</td>
</tr>
<tr>
<td width="100%">
<table border="0" width="100%" cellpadding="2">
<tr>
<td width="100%" align="center"><b><font size="2" face="Verdana">Persönliche
Kurserwartungen :</font></b></td>
</tr>
<tr>
<td width="100%" align="center" valign="top"><font size="2" face="Verdana">
<div align="center">
<center>
<table border="1" width="95%" cellspacing="0" cellpadding="3">
<tr>
<td width="100%"><font size="2" face="Verdana">
<%=request.form("raisons")%></font></td>
</tr>
</table>
</center>
</div>
</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="10">
<hr noshade size="1">
</td>
</tr>
<tr>
<td width="100%" height="10">
<div align="center">
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td align="left"><font size="1" face="Verdana">Anzahl Tagen zur
MA-Lasten</font></td>
<td><b><font size="1" face="Verdana">:</font></b></td>
<td><font size="1" face="Verdana"><%=request.form("nbrejourscoursMA")%></font></td>
<td width="30" rowspan="3"></td>
<td><font size="1" face="Verdana">Kurskosten</font></td>
<td><b><font size="1" face="Verdana">:</font></b></td>
<td><b><font size="1" face="Verdana"><%=request.form("couts")%>
CHF</font></b></td>
</tr>
<tr>
<td><font size="1" face="Verdana">Anzahl Tagen zur BM-Lasten</font></td>
<td><b><font size="1" face="Verdana">:</font></b></td>
<td><font size="1" face="Verdana"><%=request.form("nbrejourscoursBM")%></font></td>
<td><font size="1" face="Verdana">Transportkosten</font></td>
<td><b><font size="1" face="Verdana">:</font></b></td>
<td><font size="1" face="Verdana"><%=request.form("couttrsp")%>
CHF</font></td>
</tr>
<tr>
<td align="left"></td>
<td></td>
<td></td>
<td><font size="1" face="Verdana">Unterkunftkosten</font></td>
<td><b><font size="1" face="Verdana">:</font></b></td>
<td><font size="1" face="Verdana"><%=request.form("coutsautres")%>
CHF</font></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="100%" height="10">
<div align="center">
<center>
<table border="0" width="100%" cellpadding="2">
<tr>
<td width="100%" height="10">
<div align="center">
<table border="0" cellpadding="2">
<tr>
<td><font face="Verdana" size="1">Ist der Kurs im Rahmen des
Budgets ?</font></td>
<td><b><font size="2" face="Verdana">:</font></b></td>
<td>
<div align="center">
<table border="0" cellpadding="2">
<tr>
<td><font face="Verdana" size="1">
<% if request.form("budget") = "oui" then
imageoui = "<img src=""http://intranet/pics/radiook.gif"">"
else
imageoui = "<img src=""http://intranet/pics/radionok.gif"">"
end if %>
<% if request.form("budget") = "non" then
imagenon = "<img src=""http://intranet/pics/radiook.gif"">"
else
imagenon = "<img src=""http://intranet/pics/radionok.gif"">"
end if %>
<%=imageoui%>
</font></td>
<td><font face="Verdana" size="1">Ja</font></td>
<td width="15"></td>
<td><font face="Verdana" size="1">
<%=imagenon%>
</font></td>
<td><font face="Verdana" size="1">Nein</font></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="100%" height="20"></td>
</tr>
<tr>
<td width="100%" height="20">
<p align="center"><font face="Verdana" size="2">Unterschrift :
__________________________________</font></td>
</tr>
<tr>
<td width="100%" height="20"></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" valign="top">
<table border="1" width="100%" bordercolor="#808080" cellspacing="0">
<tr>
<td width="100%">
<table border="0" width="632" cellpadding="2">
<tr>
<td width="622" valign="top" colspan="2"><b><u><font face="Verdana" size="2">Vorgesetzte</font></u></b></td>
</tr>
<tr>
<td valign="top" colspan="2">
<div align="center">
<table border="0" width="100%" cellpadding="2">
<tr>
<td><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14">
<font face="Verdana" size="2">Aus-Weiter-Fortbildung</font></font></td>
<td width="28%">
<table border="0" cellpadding="2">
<tr>
<td valign="middle"><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14"></font></td>
<td valign="middle"><font face="Verdana" size="1">genehmigt</font></td>
</tr>
</table>
</td>
<td width="34%">
<table border="0" cellpadding="2">
<tr>
<td valign="middle"><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14"></font></td>
<td valign="middle"><font face="Verdana" size="1">nicht
genehmigt</font></td>
</tr>
</table>
</td>
</tr>
</center>
<tr>
<td colspan="3">
<p align="left"><font face="Verdana" size="1">..........................................................................................................................................................</font></td>
</tr>
</table>
</div>
</td>
</tr>
<center>
<tr>
<td valign="top" colspan="2">
<table border="0" width="100%" cellpadding="2">
<tr>
<td><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14">
<font face="Verdana" size="2">In Ordung mit den
persönlichen Kurzerwartungen ?</font></font></td>
<td width="73">
<table border="0" cellpadding="2">
<tr>
<td width="50%"><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14"></font></td>
<td width="50%"><font face="Verdana" size="1">ja</font></td>
</tr>
</table>
</td>
<td width="168">
<table border="0" cellpadding="2">
<tr>
<td width="50%"><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14"></font></td>
<td width="50%"><font face="Verdana" size="1">nein</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3"><font face="Verdana" size="1">..........................................................................................................................................................</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<table border="0" cellpadding="2" width="633">
<tr>
<td><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14">
<font face="Verdana" size="2">In Koordination
mit den Bedürfnisse aus der MA-Qualifikation
?</font></font></td>
<td width="10">
<table border="0" cellpadding="2">
<tr>
<td width="50%"><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14"></font></td>
<td width="50%"><font face="Verdana" size="1">ja</font></td>
</tr>
</table>
</td>
<td width="10">
<table border="0" cellpadding="2">
<tr>
<td width="50%"><font size="1"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14"></font></td>
<td width="50%"><font face="Verdana" size="1">nein</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3"><font face="Verdana" size="1">..........................................................................................................................................................</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" colspan="2" height="15"></td>
</tr>
<tr>
<td colspan="2"><font size="1" face="Verdana"><img border="0" src="http://intranet/pics/unchecked.gif" width="14" height="14">
......................................................................................................................................................</font></td>
</tr>
<tr>
<td colspan="2"><font face="Verdana" size="1">...........................................................................................................................................................</font></td>
</tr>
<tr>
<td valign="top" height="30" colspan="2">
</td>
</tr>
<tr>
<td width="622" valign="top" height="30" colspan="2">
<table border="0" width="100%" cellpadding="2">
<tr>
<td><font face="Verdana" size="2">Datum :</font></td>
<td><font face="Verdana" size="2">__________</font></td>
<td width="30"></td>
<td><font face="Verdana" size="2">Unterschrift :</font></td>
<td><font face="Verdana" size="2">__________________</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="172" valign="top" height="30"></td>
<td width="442" valign="top" height="30"></td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" valign="top">
<p align="center"><img border="0" src="../pics/footerRH.gif">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
if (confirm("Wollen Sie den Schunlungantrag drucken ?")) {
window.print()
alert("Der Antrag is ausgedruckt !")
}
else {
alert("Sie können es später machen mit CTRL + P")
}
</script>
</body>
Réponses
|