Nous sommes actuellement le 12 Juil 2026, 17:44

Le fuseau horaire est UTC-5 heures [Heure d’été]




Publier un nouveau sujet Répondre au sujet  [ 5 message(s) ] 
Auteur Message
MessagePublié: 03 Nov 2004, 17:57 
Hors-ligne
Fidèle
Fidèle

Inscription : 07 Oct 2004, 16:39
Message(s) : 852
Bonjour,

je dois reproduire un rapport excel en HTML dynamique, mon problème se situe à formater plusieur colonnes dans une sous-section d'entête. Pour garder le même format que la page excel.

Je ne peux garder des objets excel car ce programme doit rouler sans msExcel ...

Code :
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 9">
<link rel=File-List href="./Page_files/filelist.xml">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
x\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style id="ClientIndicator3_4773_Styles">
<!--table
   {mso-displayed-decimal-separator:"\.";
   mso-displayed-thousand-separator:"\,";}
.font54773
   {color:black;
   font-size:8.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Tahoma;
   mso-generic-font-family:auto;
   mso-font-charset:0;}
.font64773
   {color:black;
   font-size:8.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Tahoma;
   mso-generic-font-family:auto;
   mso-font-charset:0;}
.xl154773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:general;
   vertical-align:bottom;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl224773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:general;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl234773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:Fixed;
   text-align:right;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl244773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:Fixed;
   text-align:right;
   vertical-align:bottom;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl254773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:0;
   text-align:general;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl264773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:0;
   text-align:general;
   vertical-align:bottom;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl274773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:general;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   background:#339966;
   mso-pattern:auto none;
   white-space:nowrap;}
.xl284773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:Fixed;
   text-align:general;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl294773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:Fixed;
   text-align:general;
   vertical-align:bottom;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl304773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:Fixed;
   text-align:right;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl314773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:Fixed;
   text-align:general;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   background:white;
   mso-pattern:auto none;
   white-space:nowrap;}
.xl324773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:general;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   background:white;
   mso-pattern:auto none;
   white-space:nowrap;}
.xl334773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:Fixed;
   text-align:general;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   background:silver;
   mso-pattern:auto none;
   white-space:nowrap;}
.xl344773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial;
   mso-generic-font-family:auto;
   mso-font-charset:0;
   mso-number-format:"\#\,\#\#0";
   text-align:general;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl354773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:8.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:left;
   vertical-align:top;
   border:.5pt solid windowtext;
   background:silver;
   mso-pattern:auto none;
   white-space:normal;}
.xl364773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:8.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:Fixed;
   text-align:left;
   vertical-align:top;
   border:.5pt solid windowtext;
   background:silver;
   mso-pattern:auto none;
   white-space:normal;}
.xl374773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:8.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:0;
   text-align:left;
   vertical-align:top;
   border:.5pt solid windowtext;
   background:silver;
   mso-pattern:auto none;
   white-space:normal;}
.xl384773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:8.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:left;
   vertical-align:top;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:normal;}
.xl394773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:8.0pt;
   font-weight:400;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:general;
   vertical-align:bottom;
   mso-background-source:auto;
   mso-pattern:auto;
   white-space:nowrap;}
.xl404773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:center;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   background:silver;
   mso-pattern:auto none;
   white-space:nowrap;}
.xl414773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:8.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:left;
   vertical-align:bottom;
   border-top:none;
   border-right:none;
   border-bottom:.5pt solid windowtext;
   border-left:none;
   background:silver;
   mso-pattern:auto none;
   white-space:nowrap;}
.xl424773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:8.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:General;
   text-align:left;
   vertical-align:bottom;
   border-top:none;
   border-right:.5pt solid windowtext;
   border-bottom:.5pt solid windowtext;
   border-left:none;
   background:silver;
   mso-pattern:auto none;
   white-space:nowrap;}
.xl434773
   {padding:0px;
   mso-ignore:padding;
   color:windowtext;
   font-size:10.0pt;
   font-weight:700;
   font-style:normal;
   text-decoration:none;
   font-family:Arial, sans-serif;
   mso-font-charset:0;
   mso-number-format:0;
   text-align:center;
   vertical-align:bottom;
   border:.5pt solid windowtext;
   background:silver;
   mso-pattern:auto none;
   white-space:nowrap;}
-->
</style>
</head>

<body>
<!--[if !excel]>&nbsp;&nbsp;<![endif]-->
<!--The following information was generated by Microsoft Excel's Publish as Web
Page wizard.-->
<!--If the same item is republished from Excel, all information between the DIV
tags will be replaced.-->
<!----------------------------->
<!--START OF OUTPUT FROM EXCEL PUBLISH AS WEB PAGE WIZARD -->
<!----------------------------->

<div id="ClientIndicator3_4773" align=center x:publishsource="Excel">

<table x:str border=0 cellpadding=0 cellspacing=0 width=1058 style='border-collapse:
 collapse;table-layout:fixed;width:794pt'>
 <col width=160 style='mso-width-source:userset;mso-width-alt:5851;width:120pt'>
 <col class=xl154773 width=84 style='mso-width-source:userset;mso-width-alt:
 3072;width:63pt'>
 <col class=xl244773 width=46 style='mso-width-source:userset;mso-width-alt:
 1682;width:35pt'>
 <col width=55 style='mso-width-source:userset;mso-width-alt:2011;width:41pt'>
 <col width=69 style='mso-width-source:userset;mso-width-alt:2523;width:52pt'>
 <col class=xl294773 width=71 style='mso-width-source:userset;mso-width-alt:
 2596;width:53pt'>
 <col width=66 style='mso-width-source:userset;mso-width-alt:2413;width:50pt'>
 <col class=xl294773 width=71 style='mso-width-source:userset;mso-width-alt:
 2596;width:53pt'>
 <col width=79 style='mso-width-source:userset;mso-width-alt:2889;width:59pt'>
 <col width=76 style='mso-width-source:userset;mso-width-alt:2779;width:57pt'>
 <col class=xl264773 width=71 style='mso-width-source:userset;mso-width-alt:
 2596;width:53pt'>
 <col class=xl264773 width=70 style='mso-width-source:userset;mso-width-alt:
 2560;width:53pt'>
 <col width=72 style='mso-width-source:userset;mso-width-alt:2633;width:54pt'>
 <col width=68 style='mso-width-source:userset;mso-width-alt:2486;width:51pt'>
 <tr class=xl394773 height=17 style='height:12.75pt'>
  <td colspan=4 height=17 class=xl414773 width=345 style='border-right:.5pt solid black;
  height:12.75pt;width:259pt'><a name="RANGE!A1:N158">Period : 2004/10/22 to
  2004/10/28</a></td>
  <td colspan=4 class=xl404773 width=277 style='border-left:none;width:208pt'>Application
  Error</td>
  <td colspan=2 class=xl404773 width=155 style='border-left:none;width:116pt'>Number
  of transaction</td>
  <td colspan=2 class=xl434773 width=141 style='border-left:none;width:106pt'>Total
  Duration (min)</td>
  <td colspan=2 class=xl404773 width=140 style='border-left:none;width:105pt'>Average
  Duration (ms)</td>
 </tr>
 <tr class=xl384773 height=45 style='height:33.75pt'>
  <td height=45 class=xl354773 id="_x0000_s5174" x:autofilter="all"
  x:autofilterrange="$A$2:$N$158" width=160 style='height:33.75pt;border-top:
  none;width:120pt'><a name="RANGE!A2:N157">Zone Name</a></td>
  <td class=xl354773 id="_x0000_s5175" x:autofilter="all" width=84
  style='border-top:none;border-left:none;width:63pt'>ServicePack</td>
  <td class=xl364773 id="_x0000_s5176" x:autofilter="all" width=46
  style='border-top:none;border-left:none;width:35pt'>Percentage of Uptime</td>
  <td class=xl354773 id="_x0000_s5177" x:autofilter="all" width=55
  style='border-top:none;border-left:none;width:41pt'>Number of PIN</td>
  <td class=xl354773 id="_x0000_s5178" x:autofilter="all" width=69
  style='border-top:none;border-left:none;width:52pt'>Frontend</td>
  <td class=xl364773 id="_x0000_s5179" x:autofilter="all" width=71
  style='border-top:none;border-left:none;width:53pt'>Frontend Ratio (%)</td>
  <td class=xl354773 id="_x0000_s5180" x:autofilter="all" width=66
  style='border-top:none;border-left:none;width:50pt'>Backend</td>
  <td class=xl364773 id="_x0000_s5181" x:autofilter="all" width=71
  style='border-top:none;border-left:none;width:53pt'>Backend Ratio (%)</td>
  <td class=xl354773 id="_x0000_s5182" x:autofilter="all" width=79
  style='border-top:none;border-left:none;width:59pt'>Frontend</td>
  <td class=xl354773 id="_x0000_s5183" x:autofilter="all" width=76
  style='border-top:none;border-left:none;width:57pt'>Backend</td>
  <td class=xl374773 id="_x0000_s5184" x:autofilter="all" width=71
  style='border-top:none;border-left:none;width:53pt'>Frontend</td>
  <td class=xl374773 id="_x0000_s5185" x:autofilter="all" width=70
  style='border-top:none;border-left:none;width:53pt'>Backend</td>
  <td class=xl354773 id="_x0000_s5186" x:autofilter="all" width=72
  style='border-top:none;border-left:none;width:54pt'>Frontend</td>
  <td class=xl354773 id="_x0000_s5187" x:autofilter="all" width=68
  style='border-top:none;border-left:none;width:51pt'>Backend</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl274773 style='height:12.75pt;border-top:none'>aa</td>
  <td class=xl224773 style='border-top:none;border-left:none'>6.00.10</td>
  <td class=xl234773 style='border-top:none;border-left:none' x:num>100.00</td>
  <td class=xl224773 align=right style='border-top:none;border-left:none' x:num>0</td>
  <td class=xl324773 align=right style='border-top:none;border-left:none' x:num>8</td>
  <td class=xl314773 align=right style='border-top:none;border-left:none'
  x:num="00.04">0.04</td>
  <td class=xl324773 align=right style='border-top:none;border-left:none' x:num>37</td>
  <td class=xl284773 align=right style='border-top:none none;mso-ignore:style;
  background:yellow;mso-pattern:auto none' x:num="00.21">0.21</td>
  <td class=xl344773 align=right style='border-top:none;border-left:none'
  x:num="22431">22,431</td>
  <td class=xl344773 align=right style='border-top:none;border-left:none'
  x:num="17997">17,997</td>
  <td class=xl254773 align=right style='border-top:none;border-left:none'
  x:num="158.58">159</td>
  <td class=xl254773 align=right style='border-top:none;border-left:none'
  x:num="90.99">91</td>
  <td class=xl224773 align=right style='border-top:none;border-left:none' x:num>424</td>
  <td class=xl224773 align=right style='border-top:none;border-left:none' x:num>303</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl274773 style='height:12.75pt;border-top:none'>aac</td>
  <td class=xl224773 style='border-top:none;border-left:none'>6.00.10</td>
  <td class=xl234773 style='border-top:none;border-left:none' x:num>100.00</td>
  <td class=xl224773 align=right style='border-top:none;border-left:none' x:num>0</td>
  <td class=xl324773 align=right style='border-top:none;border-left:none' x:num>1</td>
  <td class=xl314773 align=right style='border-top:none;border-left:none'
  x:num="00.01">0.01</td>
  <td class=xl324773 align=right style='border-top:none;border-left:none' x:num>45</td>
  <td class=xl284773 align=right style='border-top:none none;mso-ignore:style;
  background:yellow;mso-pattern:auto none' x:num="00.82">0.82</td>
  <td class=xl344773 align=right style='border-top:none;border-left:none'
  x:num="14413">14,413</td>
  <td class=xl344773 align=right style='border-top:none;border-left:none'
  x:num="5508">5,508</td>
  <td class=xl254773 align=right style='border-top:none;border-left:none'
  x:num="82.54">83</td>
  <td class=xl254773 align=right style='border-top:none;border-left:none'
  x:num="25.76">26</td>
  <td class=xl224773 align=right style='border-top:none;border-left:none' x:num>344</td>
  <td class=xl224773 align=right style='border-top:none;border-left:none' x:num>281</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl274773 style='height:12.75pt;border-top:none'>accentureap</td>
  <td class=xl224773 style='border-top:none;border-left:none'>6.00.10</td>
  <td class=xl234773 style='border-top:none;border-left:none'
  x:num="99.920599999999993">99.92</td>
  <td class=xl224773 align=right style='border-top:none;border-left:none' x:num>0</td>
  <td class=xl324773 align=right style='border-top:none;border-left:none' x:num>4</td>
  <td class=xl314773 align=right style='border-top:none;border-left:none'
  x:num="00.1">0.10</td>
  <td class=xl324773 align=right style='border-top:none;border-left:none' x:num>25</td>
  <td class=xl284773 align=right style='border-top:none none;mso-ignore:style;
  background:yellow;mso-pattern:auto none' x:num="00.23">0.23</td>
  <td class=xl344773 align=right style='border-top:none;border-left:none'
  x:num="3897">3,897</td>
  <td class=xl344773 align=right style='border-top:none;border-left:none'
  x:num="10768">10,768</td>
  <td class=xl254773 align=right style='border-top:none;border-left:none'
  x:num="44.64">45</td>
  <td class=xl254773 align=right style='border-top:none;border-left:none'
  x:num="48.77">49</td>
  <td class=xl224773 align=right style='border-top:none none;mso-ignore:style;
  background:red;mso-pattern:auto none' x:num>687</td>
  <td class=xl224773 align=right style='border-top:none;border-left:none' x:num>272</td>
 </tr>
 <tr height=17 style='height:12.75pt'>
  <td height=17 class=xl274773 style='height:12.75pt;border-top:none'>aci</td>
  <td class=xl224773 style='border-top:none;border-left:none'>6.00.10</td>
  <td class=xl304773 style='border-top:none;border-left:none'
[/code]

_________________
dgagnon


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: 05 Nov 2004, 14:04 
Hors-ligne
A réponse à tout!
A réponse à tout!
Avatar de l’utilisateur

Inscription : 14 Mars 2002, 22:24
Message(s) : 3308
Localisation : Québec
D'après moi, le code serait à jeter et à recommencer... ce n'est pas très très clair.

_________________
Linux 2.6.22 debian gcc 4.2
KDE 3.5.7 / xorg-x11 7.3


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: 05 Nov 2004, 14:12 
Hors-ligne
Modérateur
Modérateur
Avatar de l’utilisateur

Inscription : 09 Sep 2002, 12:54
Message(s) : 4121
Il y a une option Save as a Web Page dans Excel 2000 et +

À votre place, je me compliquerais pas la vie et je l'utiliserais.

Sinon, bien apprenez à utiliser les Style Sheets (CSS) parce que votre code HTML est très dur à lire.


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: 05 Nov 2004, 15:53 
Hors-ligne
Fidèle
Fidèle

Inscription : 07 Oct 2004, 16:39
Message(s) : 852
Je comprend, c'est le fichier excel sauver en HTML, j'ai trouver la solution par moi même. Là j'ai plutôt un problème de javascript :

Je dois faire un calendrier HTML dynamique qui affichera des liens.

Le problème viens quand je veux changer de document. Voici un code que j'ai modifier, je ne suis pas encore rendu à la partie de faire des liens, ça va venir probablement plus tard.

Code :
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Distributed by http://www.hypergurl.com -->
<!-- Begin

   monthnames = new Array(
      "January",
      "Februrary",
      "March",
      "April",
      "May",
      "June",
      "July",
      "August",
      "September",
      "October",
      "November",
      "Decemeber");

      var linkcount=0;


   function addlink(month, day, href) {
      var entry = new Array(3);
      entry[0] = month;
      entry[1] = day;
      entry[2] = href;
      this[linkcount++] = entry;
   }

   Array.prototype.addlink = addlink(10,22,"http://www.yahoo.com");
   linkdays = new Array();
   monthdays = new Array(12);
   monthdays[0]=31;
   monthdays[1]=28;
   monthdays[2]=31;
   monthdays[3]=30;
   monthdays[4]=31;
   monthdays[5]=30;
   monthdays[6]=31;
   monthdays[7]=31;
   monthdays[8]=30;
   monthdays[9]=31;
   monthdays[10]=30;
   monthdays[11]=31;

   var todayDate=new Date();
   var thisday=todayDate.getDay();
   
   var thismonth=todayDate.getMonth();
   
   var thisdate=todayDate.getDate();
   var thisyear=todayDate.getYear();
   var thisyear = thisyear % 100;


   function getCalendar(){

      thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear));
   
      if (((thisyear % 4 == 0) && !(thisyear % 100 == 0)) ||(thisyear % 400 == 0)) monthdays[1]++;

      startspaces=thisdate;
      while (startspaces > 7) startspaces-=7;
      startspaces = thisday - startspaces + 1;
      if (startspaces < 0) startspaces+=7;

      document.write("<table border=2 bgcolor=white ");
      document.write("bordercolor=black><font color=black>");
      document.write("<tr><td colspan=7><center><strong>"
         + monthnames[thismonth] + " " + thisyear
         + "</strong></center></font></td></tr>");
      document.write("<tr>");
      document.write("<td align=center width=100 height=80 >Su</td>");
      document.write("<td align=center width=100 height=80 >M</td>");
      document.write("<td align=center width=100 height=80 >Tu</td>");
      document.write("<td align=center width=100 height=80>W</td>");
      document.write("<td align=center width=100 height=80>Th</td>");
      document.write("<td align=center width=100 height=80>F</td>");
      document.write("<td align=center width=100 height=80>Sa</td>");
      document.write("</tr>");
      document.write("<tr>");
      for (s=0;s<startspaces;s++) {
         document.write("<td width=100 height=80> </td>");
      }
      count=1;
      while (count <= monthdays[thismonth]) {
            for (b = startspaces;b<7;b++) {
               linktrue=true;
               document.write("<td width=100 height=80>");
               for (c=0;c<linkdays.length;c++) {
                  if (linkdays[c] != null) {
                     if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
                        document.write("<a href=\"" + linkdays[c][2] + "\">");
                        linktrue=true;
                           }
                     }
               }
               if (count==thisdate) {
               document.write("<font color='FF0000'><strong>");
            }
            if (count <= monthdays[thismonth]) {
               document.write(count);
            } else {
               document.write(" ");
            }
            if (count==thisdate) {
               document.write("</strong></font>");
            }
            if (linktrue)
               document.write("</a>");
            document.write("</td>");
            count++;
         }
         document.write("</tr>");
         document.write("<tr>");
         startspaces=0;
      }
      document.write("</table></p>");
      document.write("<input type=text name=q size=31 maxlength=2048> <input type=submit name=btnG VALUE=\"Rechercher\" onClick=\"setCalendar(\"December\")\">");

   }

   function setCalendar(param){

      if(param == null){
         todayDate=new Date();
         thisday=todayDate.getDay();
   
         thismonth=todayDate.getMonth();
   
         thisdate=todayDate.getDate();
         thisyear=todayDate.getYear();
         thisyear = thisyear % 100;
         getCalendar();

      } else {
         todayDate=new Date();
         thisday=todayDate.getDay();

         var i;

         for(i = 0; i < 12; i++){
            if(param == monthnames[i]){
               thismonth = i;
            }
         }
   
         thismonth=todayDate.getMonth();
   
         thisdate=todayDate.getDate();
         thisyear=todayDate.getYear();
         thisyear = thisyear % 100;         
         getCalendar();
         

      }

   }

// End -->
</script>
</head>
<body onLoad="setCalendar(null)">

<input type=text name=q size=31 maxlength=2048> <input type=submit name=btnG VALUE="Rechercher" onClick="setCalendar(q.value)">

</body>
</html>


Pourquoi mon javascript n'est plus valide ? Je devrais peut-être faire mon code en Java et intégré un .class ? Le problème doit venir que je réécrit le document au complet, donc, je perds mon header ...

_________________
dgagnon


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: 08 Nov 2004, 10:58 
Hors-ligne
Nouvel adepte
Nouvel adepte
Avatar de l’utilisateur

Inscription : 15 Jan 2002, 18:29
Message(s) : 63
Localisation : Bernières
Si vous voulez trouver l'Erreur dans votre code, utiliser le debugguer javascript intégré à firefox


Haut
 Profil  
Répondre en citant  
Afficher les messages publiés depuis :  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 5 message(s) ] 

Le fuseau horaire est UTC-5 heures [Heure d’été]


Qui est en ligne ?

Utilisateur(s) parcourant ce forum : Aucun utilisateur inscrit et 2 invité(s)


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum

Recherche de:
Aller vers :  
Propulsé par phpBB® Forum Software © phpBB Group
Traduction et support en françaisHébergement de site