bonjour
j'ai un petit probleme
voila mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
 
    <title>My JSP 'Inscription.jsp' starting page</title>
 
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
 
  </head>
 
  <body>
    <FORM METHOD=POST ACTION="Inscription" name="form"> 
<table>
   <tr><td>Identifiant :<td><input type="text" name="t1"><font size='4' color='red'><b>*</b>
      <tr><td>Mot de passe :<td><input type="text" name="t2"><font size='4' color='red'><b>*</b>
      <tr><td>Confirmation mot de passe :<td><input type="text" name="t3"><font size='4' color='red'><b>*</b>
      </table><br>
      <hr width="800"></hr>
      <font size='4' color='red'><b>informations personnelle</b></font><br>
      <table>
       <tr><td>Nom:<td><input type="text" name="t4"><font size='4' color='red'><b>*</b>
        <tr><td>Prenom :<td><input type="text" name="t5"><font size='4' color='red'><b>*</b>
          <tr><td>Adresse:<td><input type="text" name="t6"><font size='4' color='red'><b>*</b>
            <tr><td>Code postal :<td><input type="text" name="t7"><font size='4' color='red'><b>*</b>
             <tr><td>Ville :<td><input type="text" name="t8"><font size='4' color='red'><b>*</b>
              <tr><td>e-mail :<td><input type="text" name="t9"><font size='4' color='red'><b>*</b>
      </table><br>
      <input type="submit" value="Valider" onClick="controle()">
        <input type="reset" value="Annuler"><br><br><br><br>
     <font size='4' color='red'><b>*</font> champs obligatoires</b>
      </FORM>
 
 
 
 
 
 
     <SCRIPT LANGUAGE="JavaScript">
<!--
	function controle()
	{
 
if((document.forms[0].t1.value=="")||(document.forms[0].nom.value=="")||(document.forms[0].ville.value=="")||(document.forms[0].code.value=="")||(document.forms[0].mail.value=="")){
 
alert("il faut saisir les champs obligatoire ");
}
 
if((document.forms[0].mail.value.indexOf('@')==-1)||(document.forms[0].mail.value.indexOf('.')==-1))
{alert("e-mail incorrect");
}
 
 
if(isNaN(Number(document.forms[0].code.value)))
{
alert("code postal doit etre un entier ");
}
}
 
//-->
</SCRIPT>
 
 
 
  </body>
</html>

le probleme c'est lorsque je trouve les exception exprimé au niveau du javascript je veux que l'action qui existe au niveau de Submit qu'elle ne s'execute pas
merci d'avance