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 :

commande javascript document.location


Sujet :

JavaScript

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    27
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 27
    Points : 16
    Points
    16
    Par défaut commande javascript document.location
    Le problème est que une de mes fonctions javascript fonctionne correctement dans le fichier courant et envoie bien dans le get les variables demandées mais lorsque je l'intègre à un autre fichier je n'ai plus les variables dans le get
    c'est la fonction 'or' qui déconne.
    Voilà le code, il fait un calendrier :

    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
     
    <?
    /* C'est cette fonction qui ne va pas elle est en commentaire car elle est je l'ai mise dans le fichier principal qui suit
    script language="JavaScript">
    <!--
    // please keep these lines on when you copy the source
    // made by: Nicolas - <a href="http://www.javascript-page.com" target="_blank">http://www.javascript-page.com</a>
     
    function or( d,m,ye, nb) {
    //   alert ("You can get an alert or " + j + " confirm message to show up");
     m=m-1;
     document.location.href="?day="+d+"&month="+m+"&year="+ye+"&nb="+nb
    }
    // -->
    </script>
    */
    function cal_days_in_month( $mys, $month, $year) {
    if(checkdate($month, 31, $year)) return 31;
    if(checkdate($month, 30, $year)) return 30;
    if(checkdate($month, 29, $year)) return 29;
    if(checkdate($month, 28, $year)) return 28;
    return 0; // error
    }
    /*
    if(!isset($_REQUEST["m"]) ) $m = date("n");
    else $m=$_REQUEST["m"];
    if(!isset($_REQUEST["a"]) ) $a = date("Y");
    else $a=$_REQUEST["a"];
    */
    function calendar( $firstDate, $lastDate, $number, $a, $m )
    {/*
     global $m;
     global $a;*/
     
    $mnom = Array("","Janvier","Février","Mars"
       ,"Avril","Mai","Juin","Juillet","Août"
       ,"Septembre","Octobre","Novembre","Décembre");
    $dayone = date("w",mktime(1,1,1,$m,1,$a));
    if($dayone==0) $dayone=7;
     
    $url = $_SERVER['PHP_SELF'];
    $aplus=$a+1;
    $amoins=$a-1;
    ?>
      <style type="text/css">
    <!--
    a:link,a:active,a:visited
    {
     
       text-decoration:none;
       color: #000000;
    }
    tr.impaire {
     
       background-color:#f9f8f1;
     
    }
     
    tr.paire {
     
       background-color:#f2efe3;
     
    }
    body {
    font-size:10px;
       background-color: #FFFFFF;
    }
    -->
    </style>
       <script type="text/javascript">
       function surligne(elt){
       elt.style.backgroundColor="#4A7E1E";
       }
       function surligneoff(elt){
       elt.style.backgroundColor="#FFFFFF";
       }
       </script>
    <font size=1>
    <? if($amoins>=($firstDate[0]+2001)){?> <a href="<? echo $url."?m=12&a=".$amoins."&number=".$number; ?>"><<</a>&nbsp;
       <? } // 10 ans avant ?>
     
     <? 
     for($i=$a-1;$i<=$a;$i++) {?>
    <?  if($i>=($firstDate[0]+2000) && $i<=date("Y")+5){?>  <a href="<? echo $url."?m=".$m."&a=".$i."&number=".$number; ?>">
          <? echo $i; ?></a><? } ?>
    <? } ?>
    <? if($aplus<=date("Y")){?>&nbsp;<a href="<? echo $url."?m=1&a=".$aplus."&number=".$number; ?>">>></a>
       <? }// 10 ans apres ?>
    <br><br><? if($a==($firstDate[0]+2000)) {for($i=$firstDate[1];$i<=12;$i++) { ?>
       <a href="<? echo $url."?m=".$i."&a=".$a."&number=".$number; ?>">
          <? echo substr($mnom[$i],0,1); ?></a>
         <? if($i!=12 && $i!=$firstDate[1]) echo " - "; }} ?>
    	<? if($a==($lastDate[0]+2000)) {for($i=1;$i<=$lastDate[1];$i++) { ?>
       <a href="<? echo $url."?m=".$i."&a=".$a."&number=".$number; ?>">
          <? echo substr($mnom[$i],0,1); ?></a>
         <? if($i!=$lastDate[1]) echo " - "; }} ?>
    	<? if($a>($firstDate[0]+2000) && $a<($lastDate[0]+2000)) {for($i=1;$i<=12;$i++) { ?>
       <a href="<? echo $url."?m=".$i."&a=".$a."&number=".$number; ?>">
          <? echo substr($mnom[$i],0,1); ?></a>
         <? if($i!=12) echo " - "; }} ?>
         <br/><br/>
    </font>
    <font size=2>
    <? if(($m==$firstDate[1] && $a<=($firstDate[0]+2000))==false){ ?>
    <a href="<? 
    if($m==1){
     $an=$a-1;
     $mois=12;
     }
     else{
     $an=$a;
     $mois=$m-1;
     }
     
     
    echo $url."?m=".$mois."&a=".$an."&number=".$number; ?>"><<</a>&nbsp;<? } // mois avant ?>
    <? echo $mnom[$m]." ".$a; ?>
    <? if(($m==$lastDate[1] && $a>=($lastDate[0]+2000))==false){ ?>
     <? 
     if($m==12){
     $an=$a+1;
     $mois=1;
     }
     else{
     $an=$a;
     $mois=$m+1;
     }
     
     ?>
     
     &nbsp;<a href="<? echo $url."?m=".$mois."&a=".$an."&number=".$number; ?>">>></a><? }// mois apres ?></font>
    <br><br>
    <table width="170" cellspacing=0 border>
       <tr  class="paire">
          <th>L</th>
         <th>M</th>
         <th>M</th>
         <th>J</th>
         <th>V</th>
         <th>S</th>
         <th>D</th>
       <? for($i=1;$i<=42;$i++) {
          if($i%7 == 1) { ?></tr><tr><? }
          if(($i<((cal_days_in_month(CAL_GREGORIAN,$m,$a)+$dayone))&&($i>=$dayone))&&(((($m==$firstDate[1])&&($i>=($firstDate[2]+$dayone-1))))||(($m==$lastDate[1])&&($i<($lastDate[2]+$dayone)))||(($m!=$firstDate[1])&&($m!=$lastDate[1])))) { ?>
       <?// if(($m!=$firstDate[1] || ($i>$firstDate[2]+$dayone))&&($m!=$lastDate[1] || $i<$lastDate[2]+$dayone)){ ?>
             <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <? $day=$i-$dayone+1; echo "<a href='' onClick='or(".$day.",".$number.")'>"; echo $i-$dayone+1; ?></a></th>
          <?  }
         else { ?>
             <th bgcolor=silver>&nbsp;</th>
          <? }
       } ?>
    </table>
    <?
    }
    /*
    $date1[0]="06";
    $date1[1]="06";
    $date1[2]="06";
    $date2[0]="08";
    $date2[1]="07";
    $date2[2]="25";
    calendar($date1,$date2, 1);
    */
    ?>
    et le fichier principal où cette fonction est utilisée se trouve ci-dessous

    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
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
     
    <script type="text/javascript">
    <!--
    function montre(id) {
    var d = document.getElementById(id);
    	for (var i = 0; i<=31; i++) {
    		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
    	}
    if (d) {d.style.display='block';}
    }
    //-->
    </script>
    <script type="text/javascript">
    <!--
    // please keep these lines on when you copy the source
    // made by: Nicolas - <a href="http://www.javascript-page.com" target="_blank">http://www.javascript-page.com</a>
     
    function or( d,nb) {
    //   alert ("You can get an alert or " + j + " confirm message to show up");
     m=m-1;
     document.location.href="?day="+d+"&nb="+nb
    }
    // -->
    </script>
    <?php
    // $time_start = microtime(true);
     include( "graph.php" );
     include( "sgbd.inc.php" );
     include( "calendar.inc.php" );
     
     
     $lastDate = sgbdGetLastDate( $errorMsg );
     $firstDate = sgbdGetFirstDate( $errorMsg );
     
    /*
     if( !isset( $_GET['year'] ) )
    	{
    	 $year=$lastDate[0];
    	 $month=$lastDate[1];
    	 $day=$lastDate[2];
    	}
     else
    	{
    	 $year=$_GET['year'];
    	 $month=$_GET['month'];
    	 $day=$_GET['day'];
    	}
    */
     
     if( !isset( $_POST['year'] ) )
    	{
    	 $year=$lastDate[0];
    	 $month=$lastDate[1];
    	 $day=$lastDate[2];
    	}
     else
    	{
    	 $year=$_POST['year'];
    	 $month=$_POST['month'];
    	 $day=$_POST['day'];
    	}
     
     
     $a1="20".$lastDate[0];
     $m1=$lastDate[1];
    // $d1=$lastDate[2];
     $a2="20".$lastDate[0];
     $m2=$lastDate[1];
    // $d2=$lastDate[2];
     
     if( isset( $_GET['number'] ) )
    	{
    	 $number=$_GET['number'];
    	 if($number==1)
    		{
    	 	 $m1=$_GET["m"];
    	 	 $a1=$_GET["a"];
    	 	 $m2=$_COOKIE['mois2'];
    	 	 $a2=$_COOKIE['annee2'];
    		 setcookie( "mois1",$m1 );
    		 setcookie( "annee1", $a1 );
    		 setcookie( "number", $number );
    		}
    	 if($number==2)
    		{
    	 	 $m2=$_GET["m"];
    	 	 $a2=$_GET["a"];
    		 $m1=$_COOKIE['mois1'];
    		 $a1=$_COOKIE['annee1'];
    		 setcookie( "mois2",$m2 );
    		 setcookie( "annee2", $a2 );
    		}
    	}
     
     if( isset( $_GET['day'] ) )
    	{
    	 echo "sdk<br>";
    	 if( $_GET['nb']==1 )
    		 setcookie( "day1",$_GET['day'] );
    	 if( $_GET['nb']==2 )
    	 	 setcookie( "day2",$_GET['day'] );
    	}
     
     $d1=$_COOKIE['day1'];
     $d2=$_COOKIE['day2'];
     
     $errorMsg="";
     $yearList = sgbdYearList( $errorMsg );
     
    /*
     
    $date1[0]="06";
    $date1[1]="06";
    $date1[2]="06";
    $date2[0]="08";
    $date2[1]="07";
    $date2[2]="25";
     
     echo "<th><td>";
     calendar($date1,$date2,1, "07", "07");
     echo "</td><td>";
     calendar($date1,$date2,2, "08", "01");
     echo "</td></th>";
    */
     echo "<table width='620'>";
     echo "<tr><td>";
     echo "Début </td><td>";
     calendar($firstDate,$lastDate,1, $a1, $m1);
     echo "</td><td>";
     echo "Fin </td><td>";
     calendar($firstDate,$lastDate,2, $a2, $m2);
     echo "</td><td>";
     echo "<form method='POST' action='".$_SERVER['PHP_SELF']."'>";
     echo "<input type='hidden' name='year' value=''>";
     echo "<input type='hidden' name='month' value=''>";
     echo "<input type='hidden' name='day' value=''>";
     echo "<input type='submit' class='bouton' value='OK'>";
     echo "</form>";
     echo "</td></tr>";
     echo "<tr><td></td><td>$a1"." $m1"." $d1</td>";
     echo "<td></td><td>$a2"." $m2"." $d2</td><td></td></tr>";
     echo "</table>";
    /*
     echo "<form name='selection' method='GET' action='" . $_SERVER['PHP_SELF'] . "'>";
     
     echo "<SELECT name='year' onChange='Javascript:document.selection.month.value=0; document.selection.day.value=0; document.selection.submit();'>";
     echo "<OPTION value='' >Année</OPTION>";
     foreach( $yearList as $lyear )
     { $selected = "";
       $value=$lyear[2].$lyear[3];
       if( $value==$year ) $selected = "select selected";
       echo "<OPTION value='$value' $selected > $lyear </OPTION>";
     }
     echo "</SELECT>";
     
     echo "<SELECT name='month' onChange='Javascript: document.selection.day.value=0; document.selection.submit();'>";
     echo "<OPTION value='0' >Mois</OPTION>";
     $i=1;
     foreach( $monthName as $name )
     { $selected = "";
       if( $i<10 ) $value="0".$i;
       else $value=$i;
       if( $value==$month ) $selected = "select selected";
       echo "<OPTION value='$value' $selected > $name </OPTION>";
       $i++;
     }
     echo "</SELECT>";
     
     echo "<SELECT name='day' onChange='Javascript:document.selection.submit();'>";
     echo "<OPTION value='0' >Jours</OPTION>";
     foreach( $dayName as $name )
     { $selected = "";
       if( $name==$day ) $selected = "select selected";
       echo "<OPTION value='$name' $selected > $name </OPTION>";
     }
     echo "</SELECT>";
     
     echo "<BR>";
     echo "<BR>";
     
     echo "<INPUT type='radio' name='radio' value='current'>Courant";
     echo "<INPUT type='radio' name='radio' value='voltage'>Tension";
     echo "<INPUT type='radio' name='radio' value='chloride'>Chlorure";
     
     echo "</form>";
    */
     
     
    $ackCurrent=sgbdGetValue ( "current", $year, $month, $day, $errorMsg );
    $ackVoltage=sgbdGetValue ( "voltage", $year, $month, $day, $errorMsg );
    $ackReferencePotential=sgbdGetValue ( "referencePotential", $year, $month, $day, $errorMsg );
    $ackReturnPotential=sgbdGetValue ( "returnPotential", $year, $month, $day, $errorMsg );
     
     
    $ackDefaultsNumber=sgbdGetNumber( "defaults", $year, $month, $day, $errorMsg );
    $ackEventsNumber=sgbdGetNumber( "events", $year, $month, $day, $errorMsg );
    $ackCommentsNumber=sgbdGetNumber( "comments", $year, $month, $day, $errorMsg );
    /*foreach ( $ackReferencePotential as $number )
       { echo $number;
         echo "<br>";
       }*/
     
    /* $time_end = microtime(true);
     $time = $time_end - $time_start;
     echo $time;
    */
    $characteristics=graphPrint( $ackCurrent, $ackVoltage, $ackReferencePotential, $ackReturnPotential, $ackDefaultsNumber, $ackEventsNumber, $ackCommentsNumber );
     
    echo "<img src=\"./graph.png\" USEMAP=\"#map\" border=0>\n";
    echo "<div class='graphvisits' >\n";
    echo "<MAP ID=\"map\" NAME=\"map\">\n";
    for( $i=0;$i<$characteristics[2];$i++ )
    	{
    	 $x1=$characteristics[0] + $i*$characteristics[1];
    	 $x2=$characteristics[0] + ($i+1)*$characteristics[1];
     
    	 //echo '<AREA SHAPE="RECT" COORDS="0,0,20,20" href="http://www.startyourdev.com"  >'."\n";
    	 echo '<AREA SHAPE="RECT" COORDS="'.$x1.",0,".$x2.",".$characteristics[3].'" onmouseover="javascript:montre('."'smenu".$i."');".'" onmouseout="javascript:montre();">'."\n";
    	 //echo '<AREA SHAPE="RECT" COORDS="'.$x1.",0,".$x2.",".$characteristics[3].'" href="http://www.startyourdev.com">'."\n";
    	}
    //<AREA SHAPE="RECT" COORDS="88,30,110,280" onmouseover="javascript:montre('smenu10');" onmouseout="javascript:montre();">
    echo "</MAP>\n";
     
    for( $i=0;$i<$characteristics[2];$i++ )
    	{
    	 echo '<div id="smenu'.$i.'"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">'."\n";
    	 echo " Voltage : ".round($voltage[$i],2)."V <br> Courant : ".round($current[$i],2)."A<br>";
    	 echo " Consigne Pot. : ".round($referencePotential[$i],2)."V<br> Potentiel : ".round($returnPotential[$i],2)."V"."\n";
    	 echo "</div>\n";
    	}
    echo "</div>\n";
    /*
    $defaultsList = sgbdGetEvents ( "defaults","07","05",0, $errorMsg );
    $defaultsList = sgbdGetEvents ( "events","07","05",0, $errorMsg );
    $commentsList = sgbdGetComments ( "07","05",0, $errorMsg );
    */
    ?>

  2. #2
    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
    Ceci est un forum Javascript, pas php,
    merci de poster le code htmpl javascript généré ... (tout le monde na pas un serveur de dev installé ...)

    Balise code et pas quote ... (bouton # de l'editeur )


    Accessoirement location n'est pas une prorpiété de document


    remplace
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    document.location.href="?day="+d+"&nb="+nb
    par
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    self.location.href="?day="+d+"&nb="+nb
    peut être avec un # devant ?

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    27
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 27
    Points : 16
    Points
    16
    Par défaut
    je vais le mettre dans le forum php bien que le problème est sûrement sur le javascript.
    self ne fonctionne pas non plus.

  4. #4
    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
    c'est bien entendu un problème javascript et sa place est bien ici, tout ce que je dit c'est de mettre le code html javascript et pas le php !!!


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    self.location.href="self.location.href?day="+d+"&nb="+nb
    Si ça ne marche pas c'est que le problème est ailleurs, pas dans le location ...

  5. #5
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    27
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 27
    Points : 16
    Points
    16
    Par défaut
    ok, désolé je n'avais pas bien compris.
    ça ne marche toujours pas mais quand je met le javascript dans le fichier du calendrier et que je lance cette fonction dans ce fichier, le code javascript fonctionne et envoie bien ce que je veux dans le get

  6. #6
    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
    soit:
    tes paths de src pour les balises script ne sont pas bonnes...

    soit:
    un path dans le fichier du script n'est pas correct ...
    le path dans le script ayant pour base le repertoire du script et pas celui de la page porteuse si je ne m'abuse ......

  7. #7
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    27
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 27
    Points : 16
    Points
    16
    Par défaut
    Hum, les paths indique le chemin du fichier, non? le fichier principal est le second code, là où il y a le script (deux en fait).
    Je ne suis pas sur d'avoir bien compris ce que vous voulez dire ...

  8. #8
    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
    Désolé, j'ai bien peur de ne pas avoir compris ton souci ...

    peux tu expliciter un peu sur quelle pages se trouve quel code, ce qu'ils sont supposées faire ... etc ...

    et mettre le code généré (affichage source copier / coller)

  9. #9
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    27
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 27
    Points : 16
    Points
    16
    Par défaut
    le deuxieme code est le code principal. Je n'ai pas compris l'histoire des path. Le premier code affiche un calendrier où l'on peut sélectionner le jour voulu suivant l'année et le mois. Lorsque l'on clique sur le jour, la fonction javascript renvoie le jour sélectionné.

    Le programme principal (le 2eme) lui affiche deux calendriers pour sélectionner une date de début et une date de fin. La suite n'est pas importante puisqu'il s'agit d'afficher une courbe avec acces à une base.

    Je peux te donner un autre code qui marche et qui affiche juste le calendrier. Il marche quand je n'utilise qu'un seul fichier, ça peut être une piste pour trouver le pb
    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
     
    <script language="JavaScript">
    <!--
    // please keep these lines on when you copy the source
    // made by: Nicolas - http://www.javascript-page.com
     
    function or( d,m,ye, nb) {
    //   alert ("You can get an alert or " + j + " confirm message to show up");
     m=m-1;
     document.location.href="?day="+d+"&month="+m+"&year="+ye+"&nb="+nb
    }
    // -->
    </script>
    <?
    function cal_days_in_month( $mys, $month, $year) {
    if(checkdate($month, 31, $year)) return 31;
    if(checkdate($month, 30, $year)) return 30;
    if(checkdate($month, 29, $year)) return 29;
    if(checkdate($month, 28, $year)) return 28;
    return 0; // error
    }
     
    if(!isset($_REQUEST["m"]) ) $m = date("n");
    else $m=$_REQUEST["m"];
    if(!isset($_REQUEST["a"]) ) $a = date("Y");
    else $a=$_REQUEST["a"];
     
    function calendar( $firstDate, $lastDate, $number )
    {
     global $m;
     global $a;
    $mnom = Array("","Janvier","Février","Mars"
       ,"Avril","Mai","Juin","Juillet","Août"
       ,"Septembre","Octobre","Novembre","Décembre");
    $dayone = date("w",mktime(1,1,1,$m,1,$a));
    if($dayone==0) $dayone=7;
     
    $url = $_SERVER['PHP_SELF'];
    $aplus=$a+1;
    $amoins=$a-1;
    ?>
      <style type="text/css">
    <!--
    a:link,a:active,a:visited
    {
     
       text-decoration:none;
       color: #000000;
    }
    tr.impaire {
     
       background-color:#f9f8f1;
     
    }
     
    tr.paire {
     
       background-color:#f2efe3;
     
    }
    body {
    font-size:10px;
       background-color: #FFFFFF;
    }
    -->
    </style>
       <script type="text/javascript">
       function surligne(elt){
       elt.style.backgroundColor="#4A7E1E";
       }
       function surligneoff(elt){
       elt.style.backgroundColor="#FFFFFF";
       }
       </script>
    <? if($amoins>=($firstDate[0]+2001)){?> <a href="<? echo $url."?m=12&a=".$amoins; ?>"><<</a>&nbsp;
       <? } // 10 ans avant ?>
     
     <? 
     for($i=$a-1;$i<=$a;$i++) {?>
    <?  if($i>=($firstDate[0]+2000) && $i<=date("Y")+5){?>  <a href="<? echo $url."?m=".$m."&a=".$i; ?>">
          <? echo $i; ?></a><? } ?>
    <? } ?>
    <? if($aplus<=date("Y")){?>&nbsp;<a href="<? echo $url."?m=1&a=".$aplus; ?>">>></a>
       <? }// 10 ans apres ?>
    <br><br><? if($a==($firstDate[0]+2000)) {for($i=$firstDate[1];$i<=12;$i++) { ?>
       <a href="<? echo $url."?m=".$i."&a=".$a; ?>">
          <? echo substr($mnom[$i],0,1); ?></a>
         <? if($i!=12 && $i!=$firstDate[1]) echo " - "; }} ?>
    	<? if($a==($lastDate[0]+2000)) {for($i=1;$i<=$lastDate[1];$i++) { ?>
       <a href="<? echo $url."?m=".$i."&a=".$a; ?>">
          <? echo substr($mnom[$i],0,1); ?></a>
         <? if($i!=$lastDate[1]) echo " - "; }} ?>
    	<? if($a>($firstDate[0]+2000) && $a<($lastDate[0]+2000)) {for($i=1;$i<=12;$i++) { ?>
       <a href="<? echo $url."?m=".$i."&a=".$a; ?>">
          <? echo substr($mnom[$i],0,1); ?></a>
         <? if($i!=12) echo " - "; }} ?>
         <br/><br/>
    <font size=4>
    <? if(($m==$firstDate[1] && $a<=($firstDate[0]+2000))==false){ ?>
    <a href="<? 
    if($m==1){
     $an=$a-1;
     $mois=12;
     }
     else{
     $an=$a;
     $mois=$m-1;
     }
     
     
    echo $url."?m=".$mois."&a=".$an; ?>"><<</a>&nbsp;<? } // mois avant ?>
    <? echo $mnom[$m]." ".$a; ?>
    <? if(($m==$lastDate[1] && $a>=($lastDate[0]+2000))==false){ ?>
     <? 
     if($m==12){
     $an=$a+1;
     $mois=1;
     }
     else{
     $an=$a;
     $mois=$m+1;
     }
     
     ?>
     
     &nbsp;<a href="<? echo $url."?m=".$mois."&a=".$an; ?>">>></a><? }// mois apres ?></font>
    <br><br>
    <table width="170" cellspacing=0 border>
       <tr  class="paire">
          <th>L</th>
         <th>M</th>
         <th>M</th>
         <th>J</th>
         <th>V</th>
         <th>S</th>
         <th>D</th>
       <? for($i=1;$i<=42;$i++) {
          if($i%7 == 1) { ?></tr><tr><? }
          if(($i<((cal_days_in_month(CAL_GREGORIAN,$m,$a)+$dayone))&&($i>=$dayone))&&(((($m==$firstDate[1])&&($i>=($firstDate[2]+$dayone-1))))||(($m==$lastDate[1])&&($i<($lastDate[2]+$dayone)))||(($m!=$firstDate[1])&&($m!=$lastDate[1])))) { ?>
       <?// if(($m!=$firstDate[1] || ($i>$firstDate[2]+$dayone))&&($m!=$lastDate[1] || $i<$lastDate[2]+$dayone)){ ?>
             <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <? $day=$i-$dayone+1; echo "<a href='' onClick='or(".$day.",".$mois.",".$an.",".$number.")'>"; echo $i-$dayone+1; ?></a></th>
          <?  }
         else { ?>
             <th bgcolor=silver>&nbsp;</th>
          <? }
       } ?>
    </table>
    <?
    }
     
    $date1[0]="06";
    $date1[1]="06";
    $date1[2]="06";
    $date2[0]="08";
    $date2[1]="07";
    $date2[2]="25";
    calendar($date1,$date2,1);
     
    ?>

  10. #10
    Membre à l'essai
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    27
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2007
    Messages : 27
    Points : 16
    Points
    16
    Par défaut
    Et pour le code de la page :
    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
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
     
    <script type="text/javascript">
    <!--
    function montre(id) {
    var d = document.getElementById(id);
    	for (var i = 0; i<=31; i++) {
    		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
    	}
    if (d) {d.style.display='block';}
    }
    //-->
    </script>
    <script type="text/javascript">
    <!--
    // please keep these lines on when you copy the source
    // made by: Nicolas - http://www.javascript-page.com
     
    function or( d,nb) {
    //   alert ("You can get an alert or " + j + " confirm message to show up");
     self.location.href="self.location.href?day="+d+"&nb="+nb
    }
    // -->
    </script>
    <table width='620'><tr><td>Début </td><td>  <style type="text/css">
    <!--
    a:link,a:active,a:visited
    {
     
       text-decoration:none;
       color: #000000;
    }
    tr.impaire {
     
       background-color:#f9f8f1;
     
    }
     
    tr.paire {
     
       background-color:#f2efe3;
     
    }
    body {
    font-size:10px;
       background-color: #FFFFFF;
    }
    -->
    </style>
       <script type="text/javascript">
       function surligne(elt){
       elt.style.backgroundColor="#4A7E1E";
       }
       function surligneoff(elt){
       elt.style.backgroundColor="#FFFFFF";
       }
       </script>
    <font size=1>
     <a href="/history.php?m=12&a=2007&number=1"><<</a>&nbsp;
     
       <a href="/history.php?m=3&a=2007&number=1">
     
          2007</a>  <a href="/history.php?m=3&a=2008&number=1">
          2008</a><br><br>	   <a href="/history.php?m=1&a=2008&number=1">
          J</a>
          -    <a href="/history.php?m=2&a=2008&number=1">
          F</a>
     
          -    <a href="/history.php?m=3&a=2008&number=1">
          M</a>
          -    <a href="/history.php?m=4&a=2008&number=1">
          A</a>
          -    <a href="/history.php?m=5&a=2008&number=1">
          M</a>
     
          -    <a href="/history.php?m=6&a=2008&number=1">
          J</a>
          -    <a href="/history.php?m=7&a=2008&number=1">
          J</a>
         	     <br/><br/>
    </font>
    <font size=2>
    <a href="/history.php?m=2&a=2008&number=1"><<</a>&nbsp;Mars 2008  
     &nbsp;<a href="/history.php?m=4&a=2008&number=1">>></a></font>
     
    <br><br>
    <table width="170" cellspacing=0 border>
       <tr  class="paire">
          <th>L</th>
         <th>M</th>
         <th>M</th>
         <th>J</th>
         <th>V</th>
     
         <th>S</th>
         <th>D</th>
       </tr><tr>         <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(1,1)'>1</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(2,1)'>2</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(3,1)'>3</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
     
             <a href='' onClick='or(4,1)'>4</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(5,1)'>5</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(6,1)'>6</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(7,1)'>7</a></th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(8,1)'>8</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(9,1)'>9</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(10,1)'>10</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
     
             <a href='' onClick='or(11,1)'>11</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(12,1)'>12</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(13,1)'>13</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(14,1)'>14</a></th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(15,1)'>15</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(16,1)'>16</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(17,1)'>17</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
     
             <a href='' onClick='or(18,1)'>18</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(19,1)'>19</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(20,1)'>20</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(21,1)'>21</a></th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(22,1)'>22</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(23,1)'>23</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(24,1)'>24</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
     
             <a href='' onClick='or(25,1)'>25</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(26,1)'>26</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(27,1)'>27</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(28,1)'>28</a></th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(29,1)'>29</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(30,1)'>30</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(31,1)'>31</a></th>
                   <th bgcolor=silver>&nbsp;</th>
     
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
          </table>
    </td><td>Fin </td><td>  <style type="text/css">
    <!--
    a:link,a:active,a:visited
    {
     
       text-decoration:none;
       color: #000000;
    }
    tr.impaire {
     
       background-color:#f9f8f1;
     
    }
     
    tr.paire {
     
       background-color:#f2efe3;
     
    }
    body {
    font-size:10px;
       background-color: #FFFFFF;
    }
    -->
    </style>
       <script type="text/javascript">
       function surligne(elt){
       elt.style.backgroundColor="#4A7E1E";
       }
       function surligneoff(elt){
       elt.style.backgroundColor="#FFFFFF";
       }
       </script>
     
    <font size=1>
     <a href="/history.php?m=12&a=2007&number=2"><<</a>&nbsp;
     
       <a href="/history.php?m=1&a=2007&number=2">
          2007</a>  <a href="/history.php?m=1&a=2008&number=2">
          2008</a><br><br>	   <a href="/history.php?m=1&a=2008&number=2">
          J</a>
     
          -    <a href="/history.php?m=2&a=2008&number=2">
          F</a>
          -    <a href="/history.php?m=3&a=2008&number=2">
          M</a>
          -    <a href="/history.php?m=4&a=2008&number=2">
          A</a>
     
          -    <a href="/history.php?m=5&a=2008&number=2">
          M</a>
          -    <a href="/history.php?m=6&a=2008&number=2">
          J</a>
          -    <a href="/history.php?m=7&a=2008&number=2">
          J</a>
     
         	     <br/><br/>
    </font>
    <font size=2>
    <a href="/history.php?m=12&a=2007&number=2"><<</a>&nbsp;Janvier 2008  
     &nbsp;<a href="/history.php?m=2&a=2008&number=2">>></a></font>
    <br><br>
    <table width="170" cellspacing=0 border>
       <tr  class="paire">
          <th>L</th>
         <th>M</th>
     
         <th>M</th>
         <th>J</th>
         <th>V</th>
         <th>S</th>
         <th>D</th>
       </tr><tr>         <th bgcolor=silver>&nbsp;</th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(1,2)'>1</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(2,2)'>2</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(3,2)'>3</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
     
             <a href='' onClick='or(4,2)'>4</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(5,2)'>5</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(6,2)'>6</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(7,2)'>7</a></th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(8,2)'>8</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(9,2)'>9</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(10,2)'>10</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
     
             <a href='' onClick='or(11,2)'>11</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(12,2)'>12</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(13,2)'>13</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(14,2)'>14</a></th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(15,2)'>15</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(16,2)'>16</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(17,2)'>17</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
     
             <a href='' onClick='or(18,2)'>18</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(19,2)'>19</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(20,2)'>20</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(21,2)'>21</a></th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(22,2)'>22</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(23,2)'>23</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(24,2)'>24</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
     
             <a href='' onClick='or(25,2)'>25</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(26,2)'>26</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(27,2)'>27</a></th>
          </tr><tr>            <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(28,2)'>28</a></th>
     
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(29,2)'>29</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(30,2)'>30</a></th>
                      <th  onMouseOut="javascript:surligneoff(this);" onMouseOver="javascript:surligne(this);"  >
             <a href='' onClick='or(31,2)'>31</a></th>
                   <th bgcolor=silver>&nbsp;</th>
     
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
          </tr><tr>         <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
                   <th bgcolor=silver>&nbsp;</th>
     
                   <th bgcolor=silver>&nbsp;</th>
          </table>
    </td><td><form method='POST' action='/history.php'><input type='hidden' name='year' value=''><input type='hidden' name='month' value=''><input type='hidden' name='day' value=''><input type='submit' class='bouton' value='OK'></form></td></tr><tr><td></td><td>2008 3 </td><td></td><td>2008 1 </td><td></td></tr></table><img src="./graph.png" USEMAP="#map" border=0>
    <div class='graphvisits' >
    <MAP ID="map" NAME="map">
    <AREA SHAPE="RECT" COORDS="97.5,0,116.5,379" onmouseover="javascript:montre('smenu0');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="116.5,0,135.5,379" onmouseover="javascript:montre('smenu1');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="135.5,0,154.5,379" onmouseover="javascript:montre('smenu2');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="154.5,0,173.5,379" onmouseover="javascript:montre('smenu3');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="173.5,0,192.5,379" onmouseover="javascript:montre('smenu4');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="192.5,0,211.5,379" onmouseover="javascript:montre('smenu5');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="211.5,0,230.5,379" onmouseover="javascript:montre('smenu6');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="230.5,0,249.5,379" onmouseover="javascript:montre('smenu7');" onmouseout="javascript:montre();">
     
    <AREA SHAPE="RECT" COORDS="249.5,0,268.5,379" onmouseover="javascript:montre('smenu8');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="268.5,0,287.5,379" onmouseover="javascript:montre('smenu9');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="287.5,0,306.5,379" onmouseover="javascript:montre('smenu10');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="306.5,0,325.5,379" onmouseover="javascript:montre('smenu11');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="325.5,0,344.5,379" onmouseover="javascript:montre('smenu12');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="344.5,0,363.5,379" onmouseover="javascript:montre('smenu13');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="363.5,0,382.5,379" onmouseover="javascript:montre('smenu14');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="382.5,0,401.5,379" onmouseover="javascript:montre('smenu15');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="401.5,0,420.5,379" onmouseover="javascript:montre('smenu16');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="420.5,0,439.5,379" onmouseover="javascript:montre('smenu17');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="439.5,0,458.5,379" onmouseover="javascript:montre('smenu18');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="458.5,0,477.5,379" onmouseover="javascript:montre('smenu19');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="477.5,0,496.5,379" onmouseover="javascript:montre('smenu20');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="496.5,0,515.5,379" onmouseover="javascript:montre('smenu21');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="515.5,0,534.5,379" onmouseover="javascript:montre('smenu22');" onmouseout="javascript:montre();">
    <AREA SHAPE="RECT" COORDS="534.5,0,553.5,379" onmouseover="javascript:montre('smenu23');" onmouseout="javascript:montre();">
    </MAP>
     
    <div id="smenu0"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.77V <br> Courant : 11.42A<br> Consigne Pot. : 1.43V<br> Potentiel : 1.38V
    </div>
    <div id="smenu1"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.73V <br> Courant : 11.33A<br> Consigne Pot. : 1.42V<br> Potentiel : 1.37V
     
    </div>
    <div id="smenu2"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.69V <br> Courant : 11.24A<br> Consigne Pot. : 1.42V<br> Potentiel : 1.37V
    </div>
    <div id="smenu3"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.65V <br> Courant : 11.13A<br> Consigne Pot. : 1.42V<br> Potentiel : 1.37V
     
    </div>
    <div id="smenu4"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.61V <br> Courant : 11.03A<br> Consigne Pot. : 1.41V<br> Potentiel : 1.36V
    </div>
    <div id="smenu5"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.56V <br> Courant : 10.91A<br> Consigne Pot. : 1.41V<br> Potentiel : 1.36V
     
    </div>
    <div id="smenu6"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.52V <br> Courant : 10.79A<br> Consigne Pot. : 1.4V<br> Potentiel : 1.35V
    </div>
    <div id="smenu7"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.47V <br> Courant : 10.67A<br> Consigne Pot. : 1.4V<br> Potentiel : 1.35V
     
    </div>
    <div id="smenu8"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.42V <br> Courant : 10.54A<br> Consigne Pot. : 1.39V<br> Potentiel : 1.34V
    </div>
    <div id="smenu9"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.36V <br> Courant : 10.4A<br> Consigne Pot. : 1.39V<br> Potentiel : 1.34V
     
    </div>
    <div id="smenu10"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.31V <br> Courant : 10.26A<br> Consigne Pot. : 1.38V<br> Potentiel : 1.33V
    </div>
    <div id="smenu11"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.25V <br> Courant : 10.12A<br> Consigne Pot. : 1.37V<br> Potentiel : 1.32V
     
    </div>
    <div id="smenu12"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.19V <br> Courant : 9.97A<br> Consigne Pot. : 1.37V<br> Potentiel : 1.32V
    </div>
    <div id="smenu13"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.13V <br> Courant : 9.82A<br> Consigne Pot. : 1.36V<br> Potentiel : 1.31V
     
    </div>
    <div id="smenu14"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5.07V <br> Courant : 9.66A<br> Consigne Pot. : 1.36V<br> Potentiel : 1.31V
    </div>
    <div id="smenu15"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 5V <br> Courant : 9.5A<br> Consigne Pot. : 1.35V<br> Potentiel : 1.3V
     
    </div>
    <div id="smenu16"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 4.94V <br> Courant : 9.34A<br> Consigne Pot. : 1.34V<br> Potentiel : 1.29V
    </div>
    <div id="smenu17"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 4.87V <br> Courant : 9.17A<br> Consigne Pot. : 1.34V<br> Potentiel : 1.29V
     
    </div>
    <div id="smenu18"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 0V <br> Courant : 0A<br> Consigne Pot. : 0V<br> Potentiel : 0V
    </div>
    <div id="smenu19"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 0V <br> Courant : 0A<br> Consigne Pot. : 0V<br> Potentiel : 0V
     
    </div>
    <div id="smenu20"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 0V <br> Courant : 0A<br> Consigne Pot. : 0V<br> Potentiel : 0V
    </div>
    <div id="smenu21"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 0V <br> Courant : 0A<br> Consigne Pot. : 0V<br> Potentiel : 0V
     
    </div>
    <div id="smenu22"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 0V <br> Courant : 0A<br> Consigne Pot. : 0V<br> Potentiel : 0V
    </div>
    <div id="smenu23"  style="padding:10px; display:none; width:170px; font-size:13px; color:#003399; font-family:Verdana,Geneva, Arial, Helvetica, Sans-Serif; text-align:left; border:2px solid navy; position:absolute; top:8px; left:300px; background:#eee;">
     Voltage : 0V <br> Courant : 0A<br> Consigne Pot. : 0V<br> Potentiel : 0V
     
    </div>
    </div>
    Voilà j'essai d'être le plus complet possible

Discussions similaires

  1. mise à jour de l'objet javascript : document.location.hostname
    Par DarkPoster14 dans le forum Général JavaScript
    Réponses: 7
    Dernier message: 05/06/2012, 10h37
  2. Javascript document.location et identifiant
    Par guigui086 dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 11/02/2009, 13h29
  3. [POO] php-javascript : déclaration des arguments pour document.location.href
    Par littleshark dans le forum Général JavaScript
    Réponses: 5
    Dernier message: 16/09/2008, 10h00
  4. Evenement Javascript genre document.location.onchange
    Par marcha dans le forum Général JavaScript
    Réponses: 8
    Dernier message: 18/04/2008, 17h02
  5. document.location.href + asp
    Par roots_man dans le forum Général JavaScript
    Réponses: 5
    Dernier message: 25/07/2007, 11h35

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