salut

quand un client rempli un champ de mon formulaire, je voudrai que ce texte soit au milieu du champ!!

et jai egalement u probleme avec le bouton "envoyer" en fait si les champ ne sont pa rempli il affiche un message d'erreur mai il se lance comme-meme!!

est-ce que quelqu'un peu m'aider svp??

je debute!!

voici 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
80
81
82
83
84
85
86
87
88
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><script src="passparam.js"></script>
 
<SCRIPT LANGUAGE="JavaScript">
<!--
function Envoyer(f) {
 
f.submit();
 
}
 
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</SCRIPT>
 
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Document sans nom</title>
<style type="text/css">
<!--
body {
margin-right: 0px;
background-image: url();
background-color: #000000;
}
.Style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>
 
</head>
 
 
<body><form action="mailto:nom.domaine?subject=Contact" method=post ENCTYPE="text/plain" name="formulaire1">
<p align="center" class="Style3">Nom :</p>
<p align="center">
<input name="nom" type="text" size="20" length="20">
</p>
<p align="center"><br />
 
<span class="Style3">E-mail :</span></p>
<p align="center">
<input length="15" name="email" size="20" />
</p>
<p align="center"><br />
 
<span class="Style3">Sujet du message :</span></p>
<p align="center">
<input length="30" name="adresse" size="20" />
</p>
<p align="center" class="Style3"> Message : </p>
<p align="center">
<textarea name="textarea"></textarea>
</p>
<p align="center"> <br />
 
<input TYPE="button" value="Afficher" onClick="affichage();" />
<INPUT type="button" value="Envoyez !" onClick="MM_validateForm('nom','','R','email','','RisEmail','adresse','','R','textarea','','R');Envoyer(this.form);return document.MM_returnValue" />
<input type="reset" name="reset" value="Rétablir" />
</p>
</form>
 
 
</body>
</html>