Partage
  • Partager sur Facebook
  • Partager sur Twitter

apparaitre et disparaitre ligne de tablo

    5 mars 2006 à 20:07:19

    Salut,


    comment fait on pour avoir un tablo dont une ligne sur deux est caché et pour la voir, il faut cliquer sur une image.

    MErci.

    Voila mon code:
    y a un souci



    </style>
    <script type="text/javascript">
    <!––

    function details(id) {
      if (document.getElementById('td'+id).style.display == "none") {
            document.getElementById('td'+id).style.display = "inline";
      document.getElementById('img'+id).src = "voiler.gif";
      }
      else {
            document.getElementById('td'+id).style.display = "none";
            document.getElementById('img'+id).src = "devoiler.gif";
      }
    }


    //––>

    </script>
    </head>
     <body> <div class="header"><img src="corse.jpg" /></div>
     <div class="topnav">
    </div>

     <div class="corp"><img src="voyager.gif" />
     <fieldset><legend>Ouverture de vol
     </legend>
    <?PHP


    function insertion($nb){
    $i=1;
    ?>

    <form method=post action="insertion.php?nb=<?PHP echo $nb; ?>" >
    <table><caption>Vous avez décidez d'ouvir <?PHP echo $nb;?> vol.</td></caption>
    <tr><td>&nbsp;</td><td>destination</td>
                            <td>heure départ</td>
                            <td>heure arrivée</td>
                            <td>type</td>
                           
                            <td>fréquence</td>
                              </tr>
                             <?PHP
    while($i<=$nb){
    ?>
           

    <tr class="ecrit2"><td><a class="link" href="#"
    <?PHP
    echo "
    onclick=\"Javascript: details (".$i.");\""

    ?>
            ><img src="devoiler.gif" /></a></td>
      <td width="5%"><input type="text" name="destination<?PHP echo $i; ?>
    " \></td>
    <td width="5%"><input width="5%" type="text" name=h_depart<?PHP echo $i; ?><?PHP echo $i; ?> \></td><td width=5%><input width=5% type=text name=h_arrive<?PHP echo $i; ?> \></td>
                            <td width=5%><select name=type<?PHP echo $i; ?> tabindex=40>
                       <option value=t6>type6</option>
                </select></td><td width=5%>
                    <input width=5% type=text name=frequence<?PHP echo $i; ?> \></td></tr>

     
    <div class="blanc">
      <tr id="td<?PHP echo $i; ?>" style="display: none">
        <th class="blanc"><label>continent</label><input type=text name=continent<?PHP echo $i;?> />   </th>
            <th class="blanc"><label>ville</label><input type=text name=ville<?PHP echo $i;?> /></th>         
       <th class="blanc"><label>arrive</label><input type=text name=arr<?PHP echo $i;?> /></th>
       <th class="blanc"><label>depart</label><input type=text name=dep<?PHP echo $i;?> /></th>

              </tr></div>


     


    si vous voulez voir un ex http://www.jb.xooit.net/autre/index.php?nbinsertion=2

    Merci
    • Partager sur Facebook
    • Partager sur Twitter

    apparaitre et disparaitre ligne de tablo

    × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
    × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
    • Editeur
    • Markdown