Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1395 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  plusieur formulaire

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

plusieur formulaire

n°1167496
lebilien
Posté le 02-08-2005 à 08:41:36  profilanswer
 

bonjour  
J'ai un pb.
voila j'ai deux formulaire dans ma page  et j'aimerais que quand on valide le deuxieme sa prenne aussi en compte le premier .
J'explique .
Dans le premiere formulaire si on clique sur avance sa fais apparaitre un deuxieme formulaire qui differe selon le type d'utilisateur  . Donc j'aimerais savoir si il est possible d'envoyer le premier formualire en meme temp que le deuxieme merc i

mood
Publicité
Posté le 02-08-2005 à 08:41:36  profilanswer
 

n°1167499
j_lecruel
☀ ☁ ☂
Posté le 02-08-2005 à 08:43:07  profilanswer
 

Salut,
 
non. (à part avec du JS, mais ce n'est pas une bonne solution).
 
Il faut que tu n'utilise qu'un formulaire.

n°1167502
lebilien
Posté le 02-08-2005 à 08:51:59  profilanswer
 

ba j'ai pas le choix  car je vois comment faire si je prend pas 2 formulaire
car quand dans le premier formualire on choisis un domaine sa fais apparaitre en dessous le formulaire correspondant a se domaine

n°1167505
j_lecruel
☀ ☁ ☂
Posté le 02-08-2005 à 08:59:01  profilanswer
 

Je vois pas le rapport.
 
Le mieux est peut-être que tu nous file ton code...

n°1167507
lebilien
Posté le 02-08-2005 à 09:03:13  profilanswer
 

<?php
//fichier qui va contenir toute les fonctions  
include ('DB.php');
  function Interface_principale1(){
   
      //on va  demander l'affichage de la l'iterface haut  
     $HTML.='<div id="recherche" style="visibility:visible;">';
      $HTML.=Interface_haut();
      //on va afficher l'interface du milieu
      $HTML.=Interface_milieu();
      $HTML.=Interface_milieu_spe();
      //interface du bas
     // $HTML.='</div>';
     // $HTML.='<div>';
      $HTML.='</div>';
      //$HTML.=Interface_bas();
       
      echo $HTML;
  }
 
  function Interface_haut(){
     
    $html='<table align="center" class="center_haut" cellspacing=\"0\" cellpadding=\"0\" width="800" border="0">';
    $html.='<tr><td class="titre_haut" colspan=\"3\">Gestion Documentaire</td></tr>';
    $html.='<tr><td class="titremenu_haut"><a class="titremenu" href="index.php">Accueil</a></tD><td class="titremenu_haut"><a class="titremenu" href="index.php?op=administration">Administration</a></td><td class="titremenu_haut"><a class="titremenu" href="index.php?op=aide">Aide</a></td></tr>';
    $html.='</table>';
    $html.='<br>';
    return $html;
   
  }
   
  function Interface_milieu(){
  // on va afficher l'interface de recherche  
  $html='<FORM name="demoform" method="post" action="test.php">';
  $html.='<table class="recherche_milieu" width="800" align="center" cellspacing="0" cellpadding="0">';
  $html.='<tr><td class="titre_haut2">Recherche</td></tr>';
  $html.='<tr><td class="recherche">&nbsp;Titre&nbsp;:&nbsp;<input type="text" name="titre" size="35">&nbsp;&nbsp;Domaine&nbsp;:&nbsp;'.Liste_domaine().'</td></tr>';
  $html.='<tr><td class="recherche">
&nbsp;Date: <input name="dc" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform.dc);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
 
 
<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe></td></tr>';
//on va afficher les mots cles  
  $html.='<tr><td class="recherche">&nbsp;Mot cl&eacute;s:'.Affiche_liaison().'<br><br>'.Affiche_mot_cles().'<br><br></td></tr>';
  $html.='<tr><td align="center" class="recherche"><div id="bouton" style="visibility:visible;"><input name="bouton" type="submit" value="Rechercher"></div></tr></tD>';
  $html.='</FORM></table><br>';
  return $html;
  }
   
  function Interface_milieu_spe(){
  //fonction qui va permettre d'afficher selon le domaine choisis un questionnaire supplementaire
  $html='<DIV id="juridique" style="visibility:hidden;position:fixed;">';
  $html.='<FORM name="demoform2" method="post" action="test.php" onsubmit="return valider()" ><table name="juridique"  cellspacing="0" align="center" width="800" cellpadding="0" class="recherche_milieu">';
  $html.='<tr><td class="recherche">&nbsp;Nature du texte&nbsp;:&nbsp;'.Nature_texte_juridique().'';
  $html.='&nbsp;&nbsp;&nbsp;</td><td>&nbsp;Num&eacute;ro du texte&nbsp;:&nbsp;<input type="text" size="20" name="numero_text"></td></tr>';
  $html.='<tr><td class="recherche">
&nbsp;Date de publication: <input name="dp" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform2.dp);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
 
 
<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe>';
$html.='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>
&nbsp;Date de cr&eacute;ation: <input name="dcp" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform2.dcp);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
 
 
<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe></td></tr>';
  $html.='<tr><td align="center" class="recherche" colspan="2"><input type="submit" value="Rechercher"></tr></td>';
  $html.='</FORM></table><br>';
  $html.='</DIV>';
  //deuxieme formulaire
  $html.='<DIV id="informatique" style="visibility:hidden;position:absolute;">';
  $html.='<FORM name="demoform3"><table name="informatique"  cellspacing="0" align="center" width="800" cellpadding="0" class="recherche_milieu">';
  $html.='<tr><td class="recherche">&nbsp;Natures du texte&nbsp;:&nbsp;'.Nature_texte_juridique().'</td></tr>';
  $html.='<tr><td class="recherche">&nbsp;Num&eacute;ro du texte&nbsp;:&nbsp;<input type="text" size="20" name="numero_text"></td></tr>';
  $html.='<tr><td class="recherche">
&nbsp;Date de publication: <input name="dc" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform3.dc);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe></td></tr>';
  $html.='</table><br></FORM>';
  $html.='</DIV>';
 
  return $html;
   
   
  }
  function Nature_texte_juridique(){
  //on va afficher la contneu de la table j_nature_texte
  $requete="select * from j_nature_texte";
  $res=mysql_query($requete);
  $html='<select name="nature_texte"><option value=""></option>';
  while($ligne=mysql_fetch_object($res)){
    $html.='<option value='.$ligne->id.'>'.$ligne->nom.'</option>';
   
  }
  $html.='</select>';
  return $html;
  }
  function Interface_bas(){
  $fin_compte=getmicrotime();  
   $duree=($fin_compte-$_SESSION['microstart']);
  //Recherche effectuée en '.substr($duree,0,5).'&nbsp;sec
  //on va afficher dans la bas le temp d'affichage de la page
  $html='<DIV id="bas" style="position:;"><table class="affiche_temp" cellspacing="0" width="800" align="center" cellpadding="0">';
  $html.='<tr><td align="center" class="temp">Affichage effectuée en '.substr($duree,0,5).'&nbsp;sec</td></tr>';
  $html.='</table></DIV>';
  return $html;
  }
 
 
  function Liste_domaine(){
    //fonction qui va afficher la liste des domaine disponible
    $requete="select * from categorie";
    $res=mysql_query($requete);
     
    $html= '<select name="domaine" onChange="affiche_spe()"><option value="0"></option>';
    while($ligne=mysql_fetch_object($res)){
      $html.= '<option value="'.$ligne->nom.'">'.$ligne->nom.'</option>';
     
    }
    $html.= '</select>';
    return $html;
  }
   
  function Affiche_mot_cles(){
  //fonction qui va permettre d'afficher les mot cles  
  //on va boucler 5 fois pour afficher 5 fois la meme liste
  $i=0;
   $html="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
  while($i<5){
    $requete="select * from cles";
   
    $res=mysql_query($requete);
    $html.='<select name="cles'.$i.'" onChange="choix'.$i.'()"><option value="0"></option>';
      while($ligne=mysql_fetch_object($res)){
        $html.='<option value='.$ligne->id.'>'.$ligne->nom.'</option>';
       
      }
      $html.= '</select>&nbsp;&nbsp;&nbsp;';
    $i=$i+1;
  }
   
  return $html;
  }
   
  function Affiche_liaison(){
  //on va afficher le choix entre et ou ou
  $html='&nbsp;&nbsp;&nbsp;&nbsp;ET&nbsp;<input type="checkbox" name="et" onclick="choixcheckbox()">&nbsp;OU&nbsp;<input type="checkbox" name="ou" onclick="choixcheckbox()">';
  return $html;
   
  }
?>
 
 
Voila mon code en esperant que vous commprendrais qqch lol  

n°1167512
lebilien
Posté le 02-08-2005 à 09:06:09  profilanswer
 

le fichier correspond a mon fichier de fonction  si vous avez besoin du fichier index ou de voir se que cela donne je peux le mettre rapidement sur mon site ?

n°1167515
j_lecruel
☀ ☁ ☂
Posté le 02-08-2005 à 09:09:25  profilanswer
 

Ouh la... ya du boulot.
 
Donc ça ne résoudra pas ton problème mais déjà :
- on n'utilise plus de tableaux pour la mise en page (positionnement en CSS). Même chose pour les &nbsp;  
- on n'utilise pas l'évènement onchange pour un select : si l'utilisateur désactive (ou n'a pas) javascript il ne peut pas utiliser ton truc.
 
Après pour ton problème il vaut mieux que tu balance le code HTML généré, on y verra plus clair.

n°1167520
lebilien
Posté le 02-08-2005 à 09:14:24  profilanswer
 


deja c pour une entreprise dc personen ne va desactiver javascript lol dc tant mieux et oui je sais pour les tableau mais bon voila il feront avec pour l'instant  
sinon je te donne le code génére
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <link rel="stylesheet" href="ged.css" type="text/css">
  <script type="text/javascript" src="ged.js"></script>
  <title></title>
  </head>
 
  <body>
  <div id="recherche" style="visibility:visible;"><table align="center" class="center_haut" cellspacing=\"0\" cellpadding=\"0\" width="800" border="0"><tr><td class="titre_haut" colspan=\"3\">Gestion Documentaire</td></tr><tr><td class="titremenu_haut"><a class="titremenu" href="index.php">Accueil</a></tD><td class="titremenu_haut"><a class="titremenu" href="index.php?op=administration">Administration</a></td><td class="titremenu_haut"><a class="titremenu" href="index.php?op=aide">Aide</a></td></tr></table><br><FORM name="demoform" method="post" action="test.php"><table class="recherche_milieu" width="800" align="center" cellspacing="0" cellpadding="0"><tr><td class="titre_haut2">Recherche</td></tr><tr><td class="recherche">&nbsp;Titre&nbsp;:&nbsp;<input type="text" name="titre" size="35">&nbsp;&nbsp;Domaine&nbsp;:&nbsp;<select name="domaine" onChange="affiche_spe()"><option value="0"></option><option value="Informatique">Informatique</option><option value="Juridique">Juridique</option></select></td></tr><tr><td class="recherche">
&nbsp;Date: <input name="dc" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform.dc);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
 
 
<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe></td></tr><tr><td class="recherche">&nbsp;Mot cl&eacute;s:&nbsp;&nbsp;&nbsp;&nbsp;ET&nbsp;<input type="checkbox" name="et" onclick="choixcheckbox()">&nbsp;OU&nbsp;<input type="checkbox" name="ou" onclick="choixcheckbox()"><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="cles0" onChange="choix0()"><option value="0"></option><option value=1>installation</option><option value=7>qualité</option><option value=3>préparation</option><option value=6>Prodival</option><option value=5>AS400</option><option value=8>ODBC</option><option value=9>SQL</option></select>&nbsp;&nbsp;&nbsp;<select name="cles1" onChange="choix1()"><option value="0"></option><option value=1>installation</option><option value=7>qualité</option><option value=3>préparation</option><option value=6>Prodival</option><option value=5>AS400</option><option value=8>ODBC</option><option value=9>SQL</option></select>&nbsp;&nbsp;&nbsp;<select name="cles2" onChange="choix2()"><option value="0"></option><option value=1>installation</option><option value=7>qualité</option><option value=3>préparation</option><option value=6>Prodival</option><option value=5>AS400</option><option value=8>ODBC</option><option value=9>SQL</option></select>&nbsp;&nbsp;&nbsp;<select name="cles3" onChange="choix3()"><option value="0"></option><option value=1>installation</option><option value=7>qualité</option><option value=3>préparation</option><option value=6>Prodival</option><option value=5>AS400</option><option value=8>ODBC</option><option value=9>SQL</option></select>&nbsp;&nbsp;&nbsp;<select name="cles4" onChange="choix4()"><option value="0"></option><option value=1>installation</option><option value=7>qualité</option><option value=3>préparation</option><option value=6>Prodival</option><option value=5>AS400</option><option value=8>ODBC</option><option value=9>SQL</option></select>&nbsp;&nbsp;&nbsp;<br><br></td></tr><tr><td align="center" class="recherche"><div id="bouton" style="visibility:visible;"><input name="bouton" type="submit" value="Rechercher"></div></tr></tD></FORM></table><br><DIV id="juridique" style="visibility:hidden;position:fixed;"><FORM name="demoform2" method="post" action="test.php" onsubmit="return valider()" ><table name="juridique"  cellspacing="0" align="center" width="800" cellpadding="0" class="recherche_milieu"><tr><td class="recherche">&nbsp;Nature du texte&nbsp;:&nbsp;<select name="nature_texte"><option value=""></option><option value=1>Loi</option><option value=2>Ordonnance</option></select>&nbsp;&nbsp;&nbsp;</td><td>&nbsp;Num&eacute;ro du texte&nbsp;:&nbsp;<input type="text" size="20" name="numero_text"></td></tr><tr><td class="recherche">
 
&nbsp;Date de publication: <input name="dp" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform2.dp);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
 
 
<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>
&nbsp;Date de cr&eacute;ation: <input name="dcp" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform2.dcp);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
 
 
<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe></td></tr><tr><td align="center" class="recherche" colspan="2"><input type="submit" value="Rechercher"></tr></td></FORM></table><br></DIV><DIV id="informatique" style="visibility:hidden;position:absolute;"><FORM name="demoform3"><table name="informatique"  cellspacing="0" align="center" width="800" cellpadding="0" class="recherche_milieu"><tr><td class="recherche">&nbsp;Natures du texte&nbsp;:&nbsp;<select name="nature_texte"><option value=""></option><option value=1>Loi</option><option value=2>Ordonnance</option></select></td></tr><tr><td class="recherche">&nbsp;Num&eacute;ro du texte&nbsp;:&nbsp;<input type="text" size="20" name="numero_text"></td></tr><tr><td class="recherche">
 
&nbsp;Date de publication: <input name="dc" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform3.dc);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe></td></tr></table><br></FORM></DIV></div>  </body>
</html>

n°1167526
j_lecruel
☀ ☁ ☂
Posté le 02-08-2005 à 09:20:54  profilanswer
 

Ouch  :cry:  
 
Vu le bordel je regarderai si je trouve 5 minutes mais là... pas le temps désolé.
 
Petite remarque : tu as les balises cpp pour mettre en forme le code que tu colles sur le forum.
 
Deuxième remarque : tu pourrais faire l'effort d'aérer un peu ton code (indentations, styles dans un fichier à part).

n°1167532
lebilien
Posté le 02-08-2005 à 09:24:21  profilanswer
 

je veux bien  mais je dois mettre koi pour rendre mon code plus propre ? le style est deja dans un fichier css a part et le javascript aussi

mood
Publicité
Posté le 02-08-2005 à 09:24:21  profilanswer
 

n°1167542
gatsusat
Posté le 02-08-2005 à 09:34:26  profilanswer
 

Je sais pas qui a codé tout ce merdier, mais le fait d'utiliser une variable $HTML pour y coller tout le code HTML c'est nul à chier.
ensuite je ne parle pas du code je m'astiendrai, il vaut mieux.
 
Pour tes 2 formulaires, ben tu met tout dans un seul formulaire et tu gère l'affichage des éléments que tu mets soit dans un DIV, P ou fieldset que tu affiches ou tu caches par des propriétés de display.
 
ET fait l'effort de mettre en form ton code histoire qu'on y voit plus clair. Car là, ca donne même pas envie de zyeuter

n°1167550
j_lecruel
☀ ☁ ☂
Posté le 02-08-2005 à 09:40:01  profilanswer
 

gatsusat a écrit :

le fait d'utiliser une variable $HTML pour y coller tout le code HTML c'est nul à chier.


 
why ? à la limite là c'est une question de méthode.

n°1167551
lebilien
Posté le 02-08-2005 à 09:41:14  profilanswer
 

justment j'eesai de le remettre plus clair et je vous remontre

n°1167557
lebilien
Posté le 02-08-2005 à 09:45:39  profilanswer
 

par contre qqn pourrais me dire se que ej dois rajouter dans mon code pour avoir un indentation propre ?

n°1167564
j_lecruel
☀ ☁ ☂
Posté le 02-08-2005 à 09:51:03  profilanswer
 

Ben par exemple au lieu de  
 

Code :
  1. $html.='<select name="cles'.$i.'" onChange="choix'.$i.'()"><option value="0"></option>';
  2.       while($ligne=mysql_fetch_object($res)){
  3.         $html.='<option value='.$ligne->id.'>'.$ligne->nom.'</option>';
  4.      
  5.       }
  6.       $html.= '</select>&nbsp;&nbsp;&nbsp;';


 
Tu fais ça :

Code :
  1. $html.='
  2.    <select name="cles'.$i.'" onChange="choix'.$i.'()">
  3.      <option value="0"></option>';
  4. while($ligne=mysql_fetch_object($res)){
  5.    $html.='
  6.      <option value='.$ligne->id.'>'.$ligne->nom.'</option>';
  7. }
  8. $html.= "\n</select>&nbsp;&nbsp;&nbsp;";


 
Ce sera déjà un peu mieux...

n°1167580
lebilien
Posté le 02-08-2005 à 10:14:06  profilanswer
 

Code :
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3.   <head>
  4.   <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  5.   <meta name="generator" content="PSPad editor, www.pspad.com">
  6.   <link rel="stylesheet" href="ged.css" type="text/css">
  7.   <script type="text/javascript" src="ged.js"></script>
  8.   <title></title>
  9.   </head>
  10.   <body>
  11.   <div id="recherche" style="visibility:visible;">
  12. <table align='center' class='center_haut' cellspacing="0" cellpadding="0" width="800" border="0">
  13. <tr><td class="titre_haut" colspan="3">Gestion Documentaire</td></tr>
  14. <tr><td class="titremenu_haut"><a class="titremenu" href="index.php">Accueil</a></tD>
  15. <td class="titremenu_haut"><a class="titremenu" href="index.php?op=administration">Administration</a></td>
  16. <td class="titremenu_haut"><a class="titremenu" href="index.php?op=aide">Aide</a></td></tr>
  17. </table>
  18. <br>
  19. <FORM name="demoform" method="post" action="test.php">
  20. <table class="recherche_milieu" width="800" align="center" cellspacing="0" cellpadding="0">
  21. <tr><td class="titre_haut2">Recherche</td></tr>
  22. <tr><td class="recherche">&nbsp;Titre&nbsp;:&nbsp;<input type="text" name="titre" size="35">&nbsp;&nbsp;Domaine&nbsp;:&nbsp;<select name="domaine" onChange="affiche_spe()">
  23. <option value="0"></option>
  24. <option value=Informatique>Informatique</option>
  25. <option value=Juridique>Juridique</option>
  26. </select>
  27. </td></tr>
  28. <tr><td class="recherche">
  29. &nbsp;Date: <input name="dc" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform.dc);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
  30. <!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
  31. <iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
  32. </iframe></td></tr>
  33. <tr><td class="recherche">&nbsp;Mot cl&eacute;s:&nbsp;&nbsp;&nbsp;&nbsp;ET&nbsp;
  34. <input type="checkbox" name="et" onclick="choixcheckbox()">
  35. &nbsp;OU&nbsp;<input type="checkbox" name="ou" onclick="choixcheckbox()">
  36. <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="cles0" onChange="choix0()">
  37. <option value="0"></option>
  38. <option value=1>installation</option>
  39. <option value=7>qualité</option>
  40. <option value=3>préparation</option>
  41. <option value=6>Prodival</option>
  42. <option value=5>AS400</option>
  43. <option value=8>ODBC</option>
  44. <option value=9>SQL</option>
  45. </select>
  46. &nbsp;&nbsp;&nbsp;<select name="cles1" onChange="choix1()">
  47. <option value="0"></option>
  48. <option value=1>installation</option>
  49. <option value=7>qualité</option>
  50. <option value=3>préparation</option>
  51. <option value=6>Prodival</option>
  52. <option value=5>AS400</option>
  53. <option value=8>ODBC</option>
  54. <option value=9>SQL</option>
  55. </select>
  56. &nbsp;&nbsp;&nbsp;<select name="cles2" onChange="choix2()">
  57. <option value="0"></option>
  58. <option value=1>installation</option>
  59. <option value=7>qualité</option>
  60. <option value=3>préparation</option>
  61. <option value=6>Prodival</option>
  62. <option value=5>AS400</option>
  63. <option value=8>ODBC</option>
  64. <option value=9>SQL</option>
  65. </select>
  66. &nbsp;&nbsp;&nbsp;<select name="cles3" onChange="choix3()">
  67. <option value="0"></option>
  68. <option value=1>installation</option>
  69. <option value=7>qualité</option>
  70. <option value=3>préparation</option>
  71. <option value=6>Prodival</option>
  72. <option value=5>AS400</option>
  73. <option value=8>ODBC</option>
  74. <option value=9>SQL</option>
  75. </select>
  76. &nbsp;&nbsp;&nbsp;<select name="cles4" onChange="choix4()">
  77. <option value="0"></option>
  78. <option value=1>installation</option>
  79. <option value=7>qualité</option>
  80. <option value=3>préparation</option>
  81. <option value=6>Prodival</option>
  82. <option value=5>AS400</option>
  83. <option value=8>ODBC</option>
  84. <option value=9>SQL</option>
  85. </select>
  86. &nbsp;&nbsp;&nbsp;<br><br></td></tr>
  87. <tr><td align="center" class="recherche"><div id="bouton" style="visibility:visible;"><input name="bouton" type="submit" value="Rechercher"></div></tr></tD>
  88. </FORM>
  89. </table><br>
  90. <DIV id="juridique" style="visibility:hidden;position:fixed;">
  91. <FORM name="demoform2" method="post" action="test.php" onsubmit="return valider()" ><table name="juridique"  cellspacing="0" align="center" width="800" cellpadding="0" class="recherche_milieu"><tr><td class="recherche">&nbsp;Nature du texte&nbsp;:&nbsp;<select name="nature_texte">
  92. <option value=""></option>
  93. <option value=1>Loi</option>
  94. <option value=2>Ordonnance</option>
  95. </select>
  96. &nbsp;&nbsp;&nbsp;</td><td>&nbsp;Num&eacute;ro du texte&nbsp;:&nbsp;<input type="text" size="20" name="numero_text"></td></tr><tr><td class="recherche">
  97. &nbsp;Date de publication: <input name="dp" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform2.dp);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
  98. <!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
  99. <iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
  100. </iframe>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td>
  101. &nbsp;Date de cr&eacute;ation: <input name="dcp" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform2.dcp);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
  102. <!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
  103. <iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
  104. </iframe></td></tr><tr><td align="center" class="recherche" colspan="2"><input type="submit" value="Rechercher"></tr></td></FORM>
  105. </table><br>
  106. </DIV>
  107. <DIV id="informatique" style="visibility:hidden;position:absolute;">
  108. <FORM name="demoform3"><table name="informatique"  cellspacing="0" align="center" width="800" cellpadding="0" class="recherche_milieu"><tr><td class="recherche">&nbsp;Natures du texte&nbsp;:&nbsp;<select name="nature_texte">
  109. <option value=""></option>
  110. <option value=1>Loi</option>
  111. <option value=2>Ordonnance</option>
  112. </select>
  113. </td></tr><tr><td class="recherche">&nbsp;Num&eacute;ro du texte&nbsp;:&nbsp;<input type="text" size="20" name="numero_text"></td></tr><tr><td class="recherche">
  114. &nbsp;Date de publication: <input name="dc" value="" size="20"><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform3.dc);return false;" HIDEFOCUS><img name="popcal" align="absmiddle" src="WeekPicker/calbtn.gif" width="34" height="22" border="0" alt=""></a>
  115. <!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
  116. <iframe width=199 height=178 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="WeekPicker/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
  117. </iframe></td></tr></table>
  118. <br></FORM>
  119. </DIV>
  120. </div>
  121.   </body>
  122. </html>


 
voila j'espere que c un peu mieux je vais finir de tous indenter deja merci

n°1167582
gatsusat
Posté le 02-08-2005 à 10:14:43  profilanswer
 

et encore, franchement, autant directement passer avec des <? ?> intercalés dans le code HTML, ca le rend plus conviviale et plus lisible.
 
la methode du $HTML est un peu lourde, meme tres lourde

n°1167586
j_lecruel
☀ ☁ ☂
Posté le 02-08-2005 à 10:18:54  profilanswer
 

Oui mais de là à dire que c'est nul à chier... c'est comme pour certains, l'utilisation de templates est une bonne chose, perso je trouve ça lourd et inutile. Après c'est les méthodes de boulot de chacun.

n°1167589
lebilien
Posté le 02-08-2005 à 10:21:35  profilanswer
 

je sais que c lourd mais personnellement je prefere sa me permet de diviser mon code en petite partie  .
Donc vous penser que vous aller pouvoir m'aider pour mes pb de formulaires ?

n°1167591
gatsusat
Posté le 02-08-2005 à 10:24:44  profilanswer
 

ben tu n'utilise qu'un seul formulaire, c'est tout, jvois pas pourquoi tu persiste à utiliser 2 formulaires alors qu'ils fotn la meme action. C'est juste que tu vas cacher ou afficher des éléments dans le formulaire en plus.

n°1167592
lebilien
Posté le 02-08-2005 à 10:25:42  profilanswer
 

je vais tester je vous tien au courant

n°1167598
lebilien
Posté le 02-08-2005 à 10:32:09  profilanswer
 

bon c bon sa marche j'ai garder en un formulaire dc merci pour al mise en page du code lol c t tous con mais merci comme meme @ plus pour d'autre pb lol

mood
Publicité
Posté le   profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  plusieur formulaire

 

Sujets relatifs
Problème formulaire mail et bouton radioUPDATE d'une table à partir d'un formulaire
verifier formulaire existeprobleme pour insérer des données via un formulaire
Probleme formulaire...Probleme de script avec un formulaire
Boucle pour enregistrer plusieur fichiers[flash] formulaire envoi pas de valeurs sous FF
Formulaire form2mail[JS] - Mise a jour de plusieur champs text d'un formulaire.
Plus de sujets relatifs à : plusieur formulaire


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR