IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

remplir en pourcentage la case d'un tablo..


Sujet :

JavaScript

  1. #1
    Membre régulier
    Inscrit en
    Janvier 2006
    Messages
    716
    Détails du profil
    Informations forums :
    Inscription : Janvier 2006
    Messages : 716
    Points : 112
    Points
    112
    Par défaut remplir en pourcentage la case d'un tablo..
    Bonjour,
    je ne connait rien du tout en javascript, et je m'y intéresse pour la construction d'un emploi du temps en php, il me reste plus que l'affichage à faire, c'est à dire que je veux remplir une parti de la case d'un tableau.
    je voudrais savoir ci cela est possible?

    Merci de votre aide

  2. #2
    Expert éminent

    Avatar de denisC
    Profil pro
    Développeur Java
    Inscrit en
    Février 2005
    Messages
    4 050
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 4 050
    Points : 7 641
    Points
    7 641
    Par défaut
    Citation Envoyé par franfr57
    je voudrais savoir ci cela est possible?
    Oui!

    Montre nous ce que tu as commencé à faire, et ce qui ne marche pas, et ce que tu cherches à faire.....

  3. #3
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 640
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 74
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 640
    Points : 66 665
    Points
    66 665
    Billets dans le blog
    1
    Par défaut
    une bidouille avec la largeur de la brodure gauche .de la cellule..

  4. #4
    Membre régulier
    Inscrit en
    Janvier 2006
    Messages
    716
    Détails du profil
    Informations forums :
    Inscription : Janvier 2006
    Messages : 716
    Points : 112
    Points
    112
    Par défaut
    J'ai fait un tableau comme ceci :

    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
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
     
    <table width="1000" border="1" style="border-right : none; border-left: none; border-bottom: none; border-top: none">
      <tr>
        <td width="23" rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">8h</td>
     <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
      if (($mode == "sv") or ($mode == "sp"))
      {
      ?>
        <td width="100"><div align="center"><?php echo $jours[(1+$i)%7]." "; echo $resjs[$i];?></div></td>
      <?php
      }
      else if (($mode == "mv") or ($mode == "mp"))
      {
      ?>
       <td width="100"><div align="center"><?php echo $i+1;?></div></td>
      <?php
      }
     }
     ?>
        <td width="39" style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
      <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-left : none; border-top: none; border-bottom: none; border-right: none">9h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">10h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">11h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">12h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">13h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">14h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">15h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">16h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">17h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
       <?php
     for ($i=0;$i<$nbjouraffich;$i++)
     {
     ?>
        <td rowspan="2">&nbsp;</td>
     <?php
     }
     ?>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td rowspan="2" align="right" style="border-right : none; border-left: none; border-bottom: none; border-top: none">18h</td>
        <td style="border-left : none; border-right: none; border-bottom: none; border-top: none">&nbsp;</td>
      </tr>
      <tr>
        <td style="border-left: none; border-bottom: none; border-right: none; border-top : none;">&nbsp;</td>
        <td style="border-left: none; border-bottom: none; border-right: none; border-top : none;">&nbsp;</td>
        <td style="border-left: none; border-bottom: none; border-right: none; border-top : none;">&nbsp;</td>
        <td style="border-left: none; border-bottom: none; border-right: none; border-top : none;">&nbsp;</td>
        <td style="border-left: none; border-bottom: none; border-right: none; border-top : none;">&nbsp;</td>
        <td style="border-left: none; border-bottom: none; border-right: none; border-top : none;">&nbsp;</td>
        <td style="border-left: none; border-bottom: none; border-right: none; border-top : none;">&nbsp;</td>
        <td style="border-left: none; border-bottom: none; border-right: none; border-top : none;">&nbsp;</td>
      </tr>
    </table>
    Voila j'ai fait le nombre de colonnes avec un for (nombre de jour c'est à dire 7 si c'est une semaine sinon 30 ou plus)

    Merci de votre aide

Discussions similaires

  1. Réponses: 6
    Dernier message: 23/05/2009, 16h29
  2. Réponses: 2
    Dernier message: 27/04/2009, 18h08
  3. Remplir une zone de texte qd une case est cochée
    Par chelmi95 dans le forum IHM
    Réponses: 1
    Dernier message: 24/04/2008, 15h01
  4. Réponses: 9
    Dernier message: 15/05/2006, 16h23
  5. frame, pop-up remplir case de formulaire
    Par yaka2 dans le forum Général JavaScript
    Réponses: 4
    Dernier message: 09/12/2005, 15h01

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo