1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
| <%
String nom=request.getParameter("txtNom");System.out.println(nom);
String operateur=request.getParameter("txtop");System.out.println(operateur);
String num=request.getParameter("txtnum");System.out.println(num);
String path=request.getParameter("txtpath");System.out.println(path);
String codes=request.getParameter("textarea");System.out.println(codes);%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<jsp:useBean id="z" class="project.ajout" scope="session"/>
<%@ page language="java" contentType="text/html; charset=iso-8859-1"
pageEncoding="ISO-8859-1" isErrorPage="true" import="java.util.*,project.*" %>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>ajouter un service</title>
<script language="javascript" type=text/javascript>
<!--
function verifNonVide(formulaire,champs) {
var mess_ini = "Veuillez remplir les champs suivants:\n";
var mess = mess_ini ;
for(var i=0; i < champs.length; i=i+2) {
if ( eval('document.'+formulaire+'.'+champs[i]+'.value.length') < 1 ) {
mess += " - " ;
mess += champs[i+1];
mess += "\n" ;
}
}
if ( mess.length != mess_ini.length ) {
window.alert(mess);
}
else {
eval('document.'+formulaire+'.submit()');
}
}
//-->
</script>
</head>
<center>
<p><img src="file://C:\Documents and Settings\Tarek Saket\Bureau\workspace\platservice\WebContent\index_fichiers\s4.jpg" width="780" height="87" /></p>
</center>
<style type="text/css">
<!--
.Style1 {color: #FF0000}
.Style2 {color: #0000FF}
-->
</style>
<body>
<center>
<h1 class="Style2">Ajouter un service</h1>
<hr>
<form id="form1" method="post" action="ajout.jsp" method="GET" name="test">
<table>
<tr>
<td><h3 class="Style1">Entrer le libellé</h3></td>
<td><h3><input name="txtNom" value="" type="text" size="25"></h3></td>
</tr>
<tr>
<td><h3 class="Style1">Entrer le nom de l'operateur</h3></td>
<td><h3><input name="txtop" value="" type="text" size="25"></h3></td>
</tr>
<tr>
<td><h3 class="Style1">Entrer le numero_court</h3></td>
<td><h3><input name="txtnum" value="" type="text" size="25"></h3></td>
</tr>
<tr>
<td><h3 class="Style1">Entrer les différents codes</h3></td>
<td><h3><textarea name="textarea" id="textarea"></textarea></h3></td>
</tr>
<tr>
<td><h3 class="Style1">Entrer le path</h3></td>
<td><h3><input name="txtpath" value="" type="text" size="25"><h3></td>
</tr>
</table>
<table>
<tr>
<td><input type="submit" value="Ajouter"onClick="verifNonVide('test',['txtNom', 'nom de service', 'txtop', 'opérateur','txtnum','numéro court','textarea','codes','txtpath','chemin']);" name="valide"></td>
</tr>
</table>
</form>
</center>
</body>
</html> |
Partager