par
dsd7 » 20 juil. 2010, 16:50
En faisant la manipulation de nours :
si j'ai bien compris. Le bouton valider ne charge plus rien.
<?php
session_start();
if(isset($_SESSION['ok'])){
header('Location: index1.php');
}
if(isset($_POST['valide'])){
$_SESSION['ok'] = true;
header('Location: index1.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<script type="text/javascript" src="http://lesite.fr/js/checkAge.js"></script>
window.onload = function () {
var inputs = new Array(document.formAge.jour,document.formAge.mois,document.formAge.annee);
for (var i=0;i<inputs.length;i++) {
inputs[i].onkeyup = function (e) {
if ((e||window.event).keyCode==13) {
checkAge();
}
}
}
}
</script>
</head>
<body>
<form name="formAge" action="http:/lesite.fr" method="post">
<input type="text" id="jour" name="jour" onkeyup="suivant(this,'mois',2);" /> <img src="images/slash.gif" alt="" />
<input type="text" id="mois" name="mois" onkeyup="suivant(this,'annee',2);" /> <img src="images/slash.gif" alt="" />
<input type="text" id="annee" name="annee" maxlength="4" />
<input type="hidden" name="valide" value="1" />
<a href="javascript:checkAge();"><img src="images/valider.gif" alt="Valider" class="valider" /></a>
</form>
<div id="blockErreur"></div>
</body>
</html>
En faisant la manipulation de nours :
si j'ai bien compris. Le bouton valider ne charge plus rien.
[php]<?php
session_start();
if(isset($_SESSION['ok'])){
header('Location: index1.php');
}
if(isset($_POST['valide'])){
$_SESSION['ok'] = true;
header('Location: index1.php');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<script type="text/javascript" src="http://lesite.fr/js/checkAge.js"></script>
window.onload = function () {
var inputs = new Array(document.formAge.jour,document.formAge.mois,document.formAge.annee);
for (var i=0;i<inputs.length;i++) {
inputs[i].onkeyup = function (e) {
if ((e||window.event).keyCode==13) {
checkAge();
}
}
}
}
</script>
</head>
<body>
<form name="formAge" action="http:/lesite.fr" method="post">
<input type="text" id="jour" name="jour" onkeyup="suivant(this,'mois',2);" /> <img src="images/slash.gif" alt="" />
<input type="text" id="mois" name="mois" onkeyup="suivant(this,'annee',2);" /> <img src="images/slash.gif" alt="" />
<input type="text" id="annee" name="annee" maxlength="4" />
<input type="hidden" name="valide" value="1" />
<a href="javascript:checkAge();"><img src="images/valider.gif" alt="Valider" class="valider" /></a>
</form>
<div id="blockErreur"></div>
</body>
</html>[/php]