body { background:#FFFFFF; color:#000000; font-size:14px; font-family:Tahoma; }
a:link { color:#000066; text-decoration:none; font-weight:normal; }
a:visited { color:#006633; text-decoration:none; font-weight:normal; }
h1 { font-family:Tahoma; font-size:30px; color:#000000; text-decoration:none; font-weight:bold; text-align:center; }
h2 { font-family:Tahoma; font-size:24px; color:#000000; text-decoration:none; font-weight:bold; text-align:center;}
h3 { font-family:Tahoma; font-size:16px; color:#000000; text-decoration:none; font-weight:bold; text-align:center;}
h4 { font-family:Tahoma; font-size:14px; color:#000000; text-decoration:none; font-weight:bold; text-align:center;}
th { font-size:14px; color:#000000; font-weight:bold; text-align:center; font-family:Tahoma; }
td { font-size:12px; color:#000000; text-align:center; font-family:Tahoma; }
LABEL { DISPLAY: inline ; ; WIDTH: 170px ; font-family:Tahoma; font-size:14px; }
SELECT { DISPLAY: inline ; WIDTH: 170px ; font-family:Tahoma; text-align:left; }
textarea { style=FONT-SIZE: 10pt; FONT-FAMILY: Tahoma;}
hinact { font-family:Tahoma; font-size:36px; color:#FF0000; text-decoration:none; font-weight:bold; text-align:center;}
div#bandeau {
width: 100%;
height: 10%;
}
div#contenu {
float:left;
width: 90%;
height: 90%;
}
div#menu {
float:left;
width: 10%;
height: 90%;
}
div#bandeau2 {
width: auto;
height: auto;
}
div#contenu2 {
float:left;
width: 80%;
height: auto;
}
div#menu2 {
float:left;
width: auto;
height: auto;
}
<?php
session_start();
if ($_SESSION['login'])
{
if ($_SESSION['type']=='rapport') {
?>
<html>
<head>
<script language="JavaScript1.2" src="masks.js"></script>
<script src="ajax.js" type="text/javascript"></script>
<script src="prototype.js" type="text/javascript"></script>
<script language="javascript">
function verif_vides(enreg) {
if(document.enreg.nom.value=='') {
alert('Le champ nom doit etre rempli !');
document.enreg.nom.focus();
return false;
}
if(document.enreg.prenom.value=='') {
alert('Le champ prenom doit etre rempli !');
document.enreg.prenom.focus();
return false;
}
if(document.enreg.login.value=='') {
alert('Le champ login doit etre rempli !');
document.enreg.login.focus();
return false;
}
if(document.enreg.mdp.value=='') {
alert('Le champ mot de passe doit etre rempli !');
document.enreg.mdp.focus();
return false;
}
}
<!--
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
<title>Enregistement d'un nouveau rapport</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
font-family: Tahoma;
}
-->
</style><link rel="stylesheet" type="text/css" href="style.css">
</head>
<body onload="FP_preloadImgs(/*url*/'image/bouton/enregistrer.gif',/*url*/'image/bouton/enregistrer2.gif');">
<a href="javascript:history.go(-1)"><img src="image/bouton/precedent.gif" width="41" height="25" border="0"></a>
<form name="enreg" onSubmit="return verif_vides(this)" method="post" action="index.php?page=rapportAdd">
<p><label>Nom</label><input name="nom" type="text" id="nom" size="50" maxlength="60">
</p>
<p><label>Prenom</label><input name="prenom" type="text" id="prenom" size="50" maxlength="50">
</p>
<p><label>Login</label><input name="login" type="text" id="login" size="20" maxlength="20" onKeyUp="verifPseudo(this.value)">
</p>
<div id="pseudobox"></div>
<p><label>Mot de passe</label><input name="mdp" type="text" id="mdp" size="20" maxlength="20">
</p>
<p align="center">
<input name="sub" border="0" id="img99" type="image" src="image/bouton/enregistrer3.gif" height="20" width="100" alt="Enregistrer" onmouseover="FP_swapImg(1,0,/*id*/'img99',/*url*/'image/bouton/enregistrer.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img99',/*url*/'image/bouton/enregistrer3.gif')" onmousedown="FP_swapImg(1,0,/*id*/'img99',/*url*/'image/bouton/enregistrer2.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img99',/*url*/'image/bouton/enregistrer.gif')" fp-style="fp-btn: Glass Capsule 2; fp-transparent: 1" fp-title="Enregistrer">
</p>
</form>
</boby>
</html>
<?php } else {
echo "Vous n'êtes pas autorisé à accèder à cette page";
}
} else {
header("Location: accueil.php"); } ?>
est-ce que cela convient ?
Code : Tout sélectionner
<script language="JavaScript1.2" src="masks.js"></script>
<script src="ajax.js" type="text/javascript"></script>Le fichier est-il trouvé? tu as des erreurs js?qu'il ne prend pas en compte mon code ajax/ javascript
<script language="JavaScript1.2" src="masks.js"></script> en
<script src="masks.js" type="text/javascript"></script>. Et suite au conseil de victor brito j'ai ajouté <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
cela me fais donc :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd"><?php
session_start();
if ($_SESSION['login'])
{
if ($_SESSION['type']=='telepro') {
?>
<html>
<head>
<script src="masks.js" type="text/javascript"></script>
<script src="ajax.js" type="text/javascript"></script>
<script language="javascript">
function verif_vides(enreg) {
if(document.enreg.datrdv.value=='') {
alert('Le champ date doit etre rempli !');
document.enreg.datrdv.focus();
return false;
}
if(document.enreg.hrrdv.value=='') {
alert('Le champ heure doit etre rempli !');
document.enreg.hrrdv.focus();
return false;
}
}
function init()
{
// Création du masque date jj/mm/aaaa
oDateMask = new Mask("jj/mm/aaaa", "date");
oHeureMask = new Mask("##:##:00", "number");
// Associer le oDateMask aux 2 champs
oDateMask.attach(document.enreg.datrdv);
oHeureMask.attach(document.enreg.hrrdv);
}
<!--
function FP_swapImg() {//v1.0
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}
function FP_preloadImgs() {//v1.0
init();
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
function FP_getObjectByID(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
<title>Enregistement d'un nouveau representant</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
font-family: Tahoma;
}
-->
</style><link rel="stylesheet" type="text/css" href="style.css">
<style type="text/css">
<!--
.Style1 {font-family: Wingdings}
-->
</style>
</head>
<body onload="FP_preloadImgs(/*url*/'image/bouton/enregistrer.gif',/*url*/'image/bouton/enregistrer2.gif');">
<?php
if(isset($_GET['num_prospect']))
{ $num_prospect=$_GET['num_prospect'];
}
if(isset($_GET['num_representant']))
{ $num_representant=$_GET['num_representant'];
}
?>
<a href="javascript:history.go(-1)"><img src="image/bouton/precedent.gif" width="41" height="25" border="0"></a>
<form name="enreg" onSubmit="return verif_vides(this)" method="post" action="index.php?page=rdvAdd">
<input name="num_prospect" type="hidden" id="num_prospect" value="<?php echo $num_prospect; ?>">
<input name="num_representant" type="hidden" id="num_representant" value="<?php echo $num_representant; ?>">
<p><?php echo '<select size=1 name="num_representant">>'."\n";
$reqsql2 = mysql_query("SELECT nom_representant, prenom_representant
FROM representant
WHERE num_representant='$num_representant'");
while ($nom = @mysql_fetch_object($reqsql2)) {
$nomr = $nom->nom_representant;
$prenomr = $nom->prenom_representant;
echo '<option value='.$num_representant.'>'; echo $nomr.' '.$prenomr;'<option>'."\n";
}
$req = mysql_query('SELECT distinct num_representant, nom_representant, prenom_representant FROM representant WHERE inactif_representant=0 ORDER BY `nom_representant`, prenom_representant') ;
while($data = mysql_fetch_assoc($req))
{ ?>
<option value="<?php echo ($data['num_representant']) ; ?>"><?php echo ($data['nom_representant'].' '.$data['prenom_representant']); ?> </option>
<?php
} ?></select></p>
<p><label>RDV le </label><input name="datrdv" type="text" id="datrdv" size="10" maxlength="10"> à <input name="hrrdv" type="text" id="hrrdv" size="8" maxlength="8" onClick="afficherdv()"></p>
<p><h4 id="ind"></h4></p>
<?php
$reqsql = mysql_query("SELECT num_prospect, nom_prospect, prenom_prospect, ad_rue, cp_ville, ville, telephone, sexe, sexe_prospect, age, douleur, age_conj, douleur_conj, pb_particulier, detail_ad FROM prospect, ville WHERE prospect.num_insee=ville.num_insee AND num_prospect=$num_prospect");
while ($row = mysql_fetch_row($reqsql)) {
?>
<p><label>Nom et adresse</label><?php echo $row[1].' '.$row[2]; ?></p>
<p><label></label><?php echo $row[3]; ?></p>
<p><label></label><?php echo $row[4].' '.$row[5]; ?></p>
<p><label>Téléphone</label><?php echo $row[6]; ?></p>
<p><label>Contact téléphonique</label><?php switch($row[7])
{
case 'H':
$sx='H';
$sf='';
break;
case 'F':
$sx='F';
$sf='';
break;
case 'HF':
$sx=$row[8];
$sf='';
break;
case 'HV':
$sx='H';
$sf='veuf';
break;
case 'FV':
$sx='F';
$sf='veuve';
break;
case 'HC':
$sx='H';
$sf='célibataire';
break;
case 'FC':
$sx='F';
$sf='célibataire';
break;
} echo $sx.' '.$sf; ?></p>
<p><label>Age & douleur</label><?php echo $sx.' '.$row[9].' '.$row[10]; ?></p>
<?php if ($row[7]=='HF') {
if ($sx=='H') { $sxc='F'; } else { $sxc='H'; }
?>
<p><label></label><?php echo $sxc.' '.$row[11].' '.$row[12]; ?></p>
<?php } ?>
<p><label>Pb particulier</label><?php echo $row[13]; ?></p>
<p><label>Detail adresse</label><?php echo $row[14]; ?></p>
<?php } ?>
<p align="center">
<input name="sub" border="0" id="img99" type="image" src="image/bouton/enregistrer3.gif" height="20" width="100" alt="Enregistrer" onmouseover="FP_swapImg(1,0,/*id*/'img99',/*url*/'image/bouton/enregistrer.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img99',/*url*/'image/bouton/enregistrer3.gif')" onmousedown="FP_swapImg(1,0,/*id*/'img99',/*url*/'image/bouton/enregistrer2.gif')" onmouseup="FP_swapImg(0,0,/*id*/'img99',/*url*/'image/bouton/enregistrer.gif')" fp-style="fp-btn: Glass Capsule 2; fp-transparent: 1" fp-title="Enregistrer">
</p>
</form>
</boby>
</html>
<?php } else {
echo "Vous n'êtes pas autorisé à accèder à cette page";
}
} else {
header("Location: accueil.php"); } ?>
mais suite a cela j'ai aucun changement.Il ne faut choisir qu'un seul doctype (vu ton code, je te conseille d'utiliser le doctype HTML 4.01 Transitional).Et suite au conseil de victor brito j'ai ajoutécela me fais donc :<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"><?php session_start(); if ($_SESSION['login']) { if ($_SESSION['type']=='telepro') { ?> <html>