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 :

Changer la couleur sur clique d'un onglet dans un menu


Sujet :

JavaScript

  1. #21
    Membre expérimenté
    Avatar de Jumano
    Profil pro
    Inscrit en
    Février 2007
    Messages
    1 163
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Février 2007
    Messages : 1 163
    Points : 1 595
    Points
    1 595
    Par défaut
    Essaye de mettre dans la balise <body> de chaque page ceci :
    Exemple pour la page accueil :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <body onload="changeCouleur('1','2','3','4','5','6');">
    Tu modifies les chiffres pour les autres pages et tu enlèves le onclick dans les <td>.

  2. #22
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    Bonjour,

    j'ai testé ton code ça marche,mais quand j'utilise comme style "color" au lieu de "background-color" il ne se passe rien,autre chose que le défilement des images dans un cadre est bloqué, car il y a conflit d'execution entre le javascript qui défile les images et celui qui gére le clique sur un onglet.

    pour ça j'utilise cette fonction:

    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
    // Fonction de stockage des scripts à charger 
     FuncOL = new Array(); 
     function StkFunc(Obj) 
      { 
       FuncOL[FuncOL.length] = Obj;    
      } 
     
     // Execution des scripts au chargement de la page 
     window.onload = function() 
       { 
       for(i=0; i<FuncOL.length; i++) 
            {
       FuncOL[i]();
      } 
       }

    et je fais appel à cette fonction comme suit:
    bon voila ce que j'ai fait:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <body bgcolor="#ffffff" StkFunc(changeCouleur('1','2','3','4','5','6'));>
    mais j'ai toujours le déffilement des images qui est bloqué avec le problème de style.

    comment faire?
    merci de votre aide.

  3. #23
    Membre expérimenté
    Avatar de Jumano
    Profil pro
    Inscrit en
    Février 2007
    Messages
    1 163
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Février 2007
    Messages : 1 163
    Points : 1 595
    Points
    1 595
    Par défaut
    Essaye de mettre ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <body bgcolor="#ffffff" onload="runscroll; changeCouleur('1','2','3','4','5','6');">

  4. #24
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    Bonjour,

    En fait au niveau de la page accueil j ai un include de l'entete qui contient le menu des onglets et un autre include de défilement des images.
    donc pour l'include de défilement des images j'utilise du code javascript qui existe dans un fichier à part et je l'appel comme suit :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <script language="javascript" type="text/javascript" src="squelettes/Lib/include.js"></script>
    voici le code de défilement:
    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
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    <BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" >
     
    <STYLE>
    a:visited {
     font-family: Arial, Helvetica, sans-serif;
     font-size: 11px;
     color: #000000;
     text-decoration: underline; 
    }
    a:link {
     font-family: Arial, Helvetica, sans-serif;
     font-size: 11px;
     color: #000000;
     text-decoration: underline;
     
    }
    a:hover {
     font-family: Arial, Helvetica, sans-serif;
     font-size: 11px;
     color: #F15822;
     text-decoration: none;
    }
    
    a:active {
     font-family: Arial, Helvetica, sans-serif;
     font-size: 11px;
     color: #000000;
     text-decoration: underline;
    
    }
    </STYLE>
    <DIV style="MARGIN-LEFT: 2px; margin-top:2px; ">
    
    <SCRIPT language=JavaScript >
    /******************************************************************************
    * scroller.js                                                                 *
    *                                                                             *
    * Copyright 1999 by Mike Hall.                                                *
    * Web address: http://www.brainjar.com                                        *
    * Last update: March 21, 2000.                                                *
    *                                                                             *
    * Allows you to create scrolling displays on a page. Multiple scrollers can   *
    * be defined, each with it's own parameters and list of items. Item text can  *
    * include basic HTML tags, including links and images.                        *
    * Note: requires dhtmllib.js.                                                 *
    ******************************************************************************/
    
    //*****************************************************************************
    // Scroller constructor.
    //*****************************************************************************
    
    function Scroller(x, y, width, height, border, padding) {
    
      this.x = x;
      this.y = y;
      this.width = width;
      this.height = height;
      this.border = border;
      this.padding = padding;
    
      this.items = new Array();
      this.created = false;
    
      // Set default colors.
    
      this.fgColor = "#000000";
      this.bgColor = "#ffffff";
      this.bdColor = "#000000";
    
      // Set default font.
    
      this.fontFace = "Arial,Helvetica";
      this.fontSize = "2";
    
      // Set default scroll timing values.
    
      this.speed = 20;
      this.pauseTime = 2000;
    
      // Define methods.
    
      this.setColors = scrollerSetColors;
      this.setFont = scrollerSetFont;
      this.setSpeed = scrollerSetSpeed;
      this.setPause = scrollersetPause;
      this.addItem = scrollerAddItem;
      this.create = scrollerCreate;
      this.show = scrollerShow;
      this.hide = scrollerHide;
      this.moveTo = scrollerMoveTo;
      this.moveBy = scrollerMoveBy;
      this.getzIndex = scrollerGetzIndex;
      this.setzIndex = scrollerSetzIndex;
      this.stop = scrollerStop;
      this.start = scrollerStart;
    }
    
    //*****************************************************************************
    // Scroller methods.
    //*****************************************************************************
    
    function scrollerSetColors(fgcolor, bgcolor, bdcolor) {
    
      if (!this.created) {
        this.fgColor = fgcolor;
        this.bgColor = bgcolor;
        this.bdColor = bdcolor;
      }
    }
    
    function scrollerSetFont(face, size) {
    
      if (!this.created) {
        this.fontFace = face;
        this.fontSize = size;
      }
    }
    
    function scrollerSetSpeed(pps) {
    
      if (!this.created)
        this.speed = pps;
    }
    
    function scrollersetPause(ms) {
    
      if (!this.created)
        this.pauseTime = ms;
    }
    
    function scrollerAddItem(str) {
    
      if (!this.created)
        this.items[this.items.length] = str;
    }
    
    function scrollerCreate() {
    
      var start, end;
      var str;
      var i, j;
      var x, y;
      
    
      if (!isMinNS4 && !isMinIE4)
        return;
    
      // On first scroller, start interval timer.
    
      if (scrollerList.length == 0)
        setInterval('scrollerGo()', scrollerInterval);
    
      // Create the scroller only once.
    
      if (this.created)
        return;
      this.created = true;
    
      // Copy first item to the end of the list, this lets us scroll from the last
      // defined item to the first without jumping.
    
      this.items[this.items.length] = this.items[0];
    
      // Set up HTML code for item text.
    
      start = '<div style="position:absolute;top:170px;left:4px;'
             + ' font-weight:bold; width:180px;color:#FFFFFF; font-size:12;'
             + ' font-family:Arial, Helvetica, sans-serif">'
             + ' Cliquez pour voir les biens</div>'
             + '<table border=0'
            + ' cellpadding=' + (this.padding + this.border) + ' cellspacing=0'
            + ' width=' + this.width + ' height=' + this.height + '>'
            + '<tr><td>'
            + '<font color="' + this.fgColor + '" face="' + this.fontFace + '"'
            + ' size=' + this.fontSize + '>' ;
      end   = '</font></td></tr></table>';
    
      // Build the layers.
    
      if (isMinNS4) {
        this.baseLayer = new Layer(this.width);
        this.scrollLayer = new Layer(this.width, this.baseLayer);
        this.scrollLayer.visibility = "inherit";
        this.itemLayers = new Array();
        for (i = 0; i < this.items.length; i++) {
          this.itemLayers[i] = new Layer(this.width, this.scrollLayer);
          this.itemLayers[i].document.open();
          this.itemLayers[i].document.writeln(start + this.items[i] + end);
          this.itemLayers[i].document.close();
          this.itemLayers[i].visibility = "inherit";
        }
    
        // Set background colors.
    
        setBgColor(this.baseLayer, this.bdColor);
        setBgColor(this.scrollLayer, this.bgColor);
      }
    
      if (isMinIE4) {
        i = scrollerList.length;
        str = '<div id="scroller' + i + '_baseLayer"'
            + ' style="position:absolute;'
            + 'left:0px; top:0px;'
            // + 'background-color:' + this.bdColor + ';'
            + 'width:' + this.width + 'px;'
            + 'height:' + this.height + 'px;'
            + 'overflow:hidden;'
            + 'visibility:hidden;">\n'
            + '<div id="scroller' + i + '_scrollLayer"'
            + ' style="position:absolute;'
            // + 'background-color: ' + this.bgColor + ';'
            + 'width:' + this.width + 'px;'
            + 'height:' + (this.height * this.items.length) + 'px;'
            + 'visibility:inherit;">\n';
        for (j = 0; j < this.items.length; j++) {
          str += '<div id="scroller' + i + '_itemLayer' + j + '"'
              +  ' style="position:absolute;'
              +  'width:' + this.width + 'px;'
              +  'height:' + this.height + 'px;'
              +  'visibility:inherit;">\n'
              +  start + this.items[j] +'test'+ end
              +  '</div>\n';
              + '<div style="position:absolute;left:0px; top:0px;">test</div>';
        }
      
        str += '</div>\n'
            +  '</div>\n';
    
        // Insert HTML code at end of page. For IE4, need to scroll window to
        // end of page, insert and scroll back to correct bug.
    
        if (!isMinIE5) {
          x = getPageScrollX();
          y = getPageScrollY();
          window.scrollTo(getPageWidth(), getPageHeight());
        }
        document.body.insertAdjacentHTML("beforeEnd", str);
        if (!isMinIE5)
          window.scrollTo(x, y);
    
        // Get handles to each layer.
    
        this.baseLayer = getLayer("scroller" + i + "_baseLayer");
        this.scrollLayer = getLayer("scroller" + i + "_scrollLayer");
        this.itemLayers = new Array();
        for (j = 0; j < this.items.length; j++)
          this.itemLayers[j] = getLayer("scroller" + i + "_itemLayer" + j);
      }
    
      // Position and clip base and scroll layers.
    
      moveLayerTo(this.baseLayer, this.x, this.y);
      clipLayer(this.baseLayer, 0, 0, this.width, this.height);
      moveLayerTo(this.scrollLayer, this.border, this.border);
      clipLayer(this.scrollLayer, 0, 0,
                this.width - 2 * this.border, this.height - 2 * this.border);
    
      // Position and clip each item layer.
    
      x = 0;
      y = 0;
      for (i = 0; i < this.items.length; i++) {
        moveLayerTo(this.itemLayers[i], x, y);
        clipLayer(this.itemLayers[i], 0, 0, this.width, this.height);
        y += this.height;
      }
    
      // Set up scrolling parameters.
    
      this.stopped = false;
      this.currentY = 0;
      this.stepY = this.speed / (1000 / scrollerInterval);
      this.stepY = Math.min(this.height, this.stepY);
      this.nextY = this.height;
      this.maxY = this.height * (this.items.length - 1);
      this.paused = true;
      this.counter = 0;
    
      // Add to global list.
    
      scrollerList[scrollerList.length] = this;
    
      // Display it.
    
      showLayer(this.baseLayer);
    }
    
    function scrollerShow() {
    
      if (this.created)
        showLayer(this.baseLayer);
    }
    
    function scrollerHide() {
    
      if (this.created)
        hideLayer(this.baseLayer);
    }
    
    function scrollerMoveTo(x, y) {
    
      if (this.created)
        moveLayerTo(this.baseLayer, x, y);
    }
    
    function scrollerMoveBy(dx, dy) {
    
      if (this.created)
        moveLayerBy(this.baseLayer, dx, dy);
    }
    
    function scrollerGetzIndex() {
    
      if (this.created)
        return(getzIndex(this.baseLayer));
      else
        return(0);
    }
    
    function scrollerSetzIndex(z) {
    
      if (this.created)
        setzIndex(this.baseLayer, z);
    }
    
    function scrollerStart() {
    
      this.stopped = false;
    }
    
    function scrollerStop() {
    
      this.stopped = true;
    }
    
    
    //*****************************************************************************
    // Code for scrolling.
    //*****************************************************************************
    
    // An array is used to hold a pointer to each scroller that is defined. The
    // scrollerGo() function runs at regular intervals and updates each scroller
    // in this list.
    
    var scrollerList     = new Array();
    var scrollerInterval = 20;
    
    function scrollerGo() {
    
      var i;
    
      // Update each scroller object in the list.
    
      for (i = 0; i < scrollerList.length; i++) {
    
        // If stopped, skip.
    
        if (scrollerList[i].stopped);
    
        // If paused, update counter.
    
        else if (scrollerList[i].paused) {
          scrollerList[i].counter += scrollerInterval;
          if (scrollerList[i].counter > scrollerList[i].pauseTime)
            scrollerList[i].paused = false;
        }
    
        // Scroll it.
    
        else {
          scrollerList[i].currentY += scrollerList[i].stepY;
    
          // Pause it if the next item has scrolled into view.
    
          if (scrollerList[i].currentY >= scrollerList[i].nextY) {
            scrollerList[i].paused = true;
            scrollerList[i].counter = 0;
            scrollerList[i].currentY = scrollerList[i].nextY;
            scrollerList[i].nextY += scrollerList[i].height;
          }
    
          // When we reach the end, start over.
    
          if (scrollerList[i].currentY >= scrollerList[i].maxY) {
            scrollerList[i].currentY -= scrollerList[i].maxY;
            scrollerList[i].nextY = scrollerList[i].height;
          }
          scrollLayerTo(scrollerList[i].scrollLayer,
                        0, Math.round(scrollerList[i].currentY),
                        false);
        }
      }
    }
    
    //*****************************************************************************
    // Code to handle a window resize.
    //*****************************************************************************
    
    // These variables are used to determine if a resize event is a true one in
    // older releases of NS4.
    
    var origWidth;
    var origHeight;
    
    // Reload page in case of a browser resize.
    
    if (isMinNS4) {
      origWidth  = window.innerWidth;
      origHeight = window.innerHeight;
    }
    window.onresize = scrollerReload;
    
    function scrollerReload() {
    
      if (isMinNS4 && origWidth == window.innerWidth && origHeight == window.innerHeight)
        return;
    
      // For IE, reload on a timer in case the Windows 'Show window contents while
      // dragging' display option is on.
    
      if (isMinIE4)
        setTimeout('window.location.href = window.location.href', 2000);
      else
        window.location.href = window.location.href;
    }
    
    </SCRIPT>
    <SCRIPT language=JavaScript >
    
    /******************************************************************************
    * dhtmllib.js                                                                 *
    *                                                                             *
    * Copyright 1999 by Mike Hall.                                                *
    * Web address: http://www.brainjar.com                                        *
    * Last update: February 26, 2000.                                             *
    *                                                                             *
    * Provides basic functions for DHTML positioned elements which will work on   *
    * both Netscape Communicator and Internet Explorer browsers (version 4.0 and  *
    * up).                                                                        *
    ******************************************************************************/
    
    // Determine browser.
    
    var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
                   parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
    var isMinIE4 = (document.all) ? 1 : 0;
    var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;
    
    //-----------------------------------------------------------------------------
    // Layer visibility.
    //-----------------------------------------------------------------------------
    
    function hideLayer(layer) {
    
      if (isMinNS4)
        layer.visibility = "hide";
      if (isMinIE4)
        layer.style.visibility = "hidden";
    }
    
    function showLayer(layer) {
    
      if (isMinNS4)
        layer.visibility = "show";
      if (isMinIE4)
        layer.style.visibility = "visible";
    }
    
    function inheritLayer(layer) {
    
      if (isMinNS4)
        layer.visibility = "inherit";
      if (isMinIE4)
        layer.style.visibility = "inherit";
    }
    
    function getVisibility(layer) {
    
      if (isMinNS4) {
        if (layer.visibility == "show")
          return "visible";
        if (layer.visibility == "hide")
          return "hidden";
        return layer.visibility;
      }
      if (isMinIE4)
        return layer.style.visibility;
      return "";
    }
    
    //-----------------------------------------------------------------------------
    // Layer positioning.
    //-----------------------------------------------------------------------------
    
    function moveLayerTo(layer, x, y) {
    
      if (isMinNS4)
        layer.moveTo(x, y);
      if (isMinIE4) {
        layer.style.left = x;
        layer.style.top  = y;
      }
    }
    
    function moveLayerBy(layer, dx, dy) {
    
      if (isMinNS4)
        layer.moveBy(dx, dy);
      if (isMinIE4) {
        layer.style.pixelLeft += dx;
        layer.style.pixelTop  += dy;
      }
    }
    
    function getLeft(layer) {
    
      if (isMinNS4)
        return layer.left;
      if (isMinIE4)
        return layer.style.pixelLeft;
      return -1;
    }
    
    function getTop(layer) {
    
      if (isMinNS4)
        return layer.top;
      if (isMinIE4)
        return layer.style.pixelTop;
      return -1;
    }
    
    function getRight(layer) {
    
      if (isMinNS4)
        return layer.left + getWidth(layer);
      if (isMinIE4)
        return layer.style.pixelLeft + getWidth(layer);
      return -1;
    }
    
    function getBottom(layer) {
    
      if (isMinNS4)
        return layer.top + getHeight(layer);
      if (isMinIE4)
        return layer.style.pixelTop + getHeight(layer);
      return -1;
    }
    
    function getPageLeft(layer) {
    
      var x;
    
      if (isMinNS4)
        return layer.pageX;
      if (isMinIE4) {
        x = 0;
        while (layer.offsetParent != null) {
          x += layer.offsetLeft;
          layer = layer.offsetParent;
        }
        x += layer.offsetLeft;
        return x;
      }
      return -1;
    }
    
    function getPageTop(layer) {
    
      var y;
    
      if (isMinNS4)
        return layer.pageY;
      if (isMinIE4) {
        y = 0;
        while (layer.offsetParent != null) {
          y += layer.offsetTop;
          layer = layer.offsetParent;
        }
        y += layer.offsetTop;
        return y;
      }
      return -1;
    }
    
    function getWidth(layer) {
    
      if (isMinNS4) {
        if (layer.document.width)
          return layer.document.width;
        else
          return layer.clip.right - layer.clip.left;
      }
      if (isMinIE4) {
        if (layer.style.pixelWidth)
          return layer.style.pixelWidth;
        else
          return layer.clientWidth;
      }
      return -1;
    }
    
    function getHeight(layer) {
    
      if (isMinNS4) {
        if (layer.document.height)
          return layer.document.height;
        else
          return layer.clip.bottom - layer.clip.top;
      }
      if (isMinIE4) {
        if (layer.style.pixelHeight)
          return layer.style.pixelHeight;
        else
          return layer.clientHeight;
      }
      return -1;
    }
    
    function getzIndex(layer) {
    
      if (isMinNS4)
        return layer.zIndex;
      if (isMinIE4)
        return layer.style.zIndex;
    
      return -1;
    }
    
    function setzIndex(layer, z) {
    
      if (isMinNS4)
        layer.zIndex = z;
      if (isMinIE4)
        layer.style.zIndex = z;
    }
    
    //-----------------------------------------------------------------------------
    // Layer clipping.
    //-----------------------------------------------------------------------------
    
    function clipLayer(layer, clipleft, cliptop, clipright, clipbottom) {
    
      if (isMinNS4) {
        layer.clip.left   = clipleft;
        layer.clip.top    = cliptop;
        layer.clip.right  = clipright;
        layer.clip.bottom = clipbottom;
      }
      if (isMinIE4)
        layer.style.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' ' + clipleft +')';
    }
    
    function getClipLeft(layer) {
    
      if (isMinNS4)
        return layer.clip.left;
      if (isMinIE4) {
        var str =  layer.style.clip;
        if (!str)
          return 0;
        var clip = getIEClipValues(layer.style.clip);
        return(clip[3]);
      }
      return -1;
    }
    
    function getClipTop(layer) {
    
      if (isMinNS4)
        return layer.clip.top;
      if (isMinIE4) {
        var str =  layer.style.clip;
        if (!str)
          return 0;
        var clip = getIEClipValues(layer.style.clip);
        return clip[0];
      }
      return -1;
    }
    
    function getClipRight(layer) {
    
      if (isMinNS4)
        return layer.clip.right;
      if (isMinIE4) {
        var str =  layer.style.clip;
        if (!str)
          return layer.style.pixelWidth;
        var clip = getIEClipValues(layer.style.clip);
        return clip[1];
      }
      return -1;
    }
    
    function getClipBottom(layer) {
    
      if (isMinNS4)
        return layer.clip.bottom;
      if (isMinIE4) {
        var str =  layer.style.clip;
        if (!str)
          return layer.style.pixelHeight;
        var clip = getIEClipValues(layer.style.clip);
        return clip[2];
      }
      return -1;
    }
    
    function getClipWidth(layer) {
    
      if (isMinNS4)
        return layer.clip.width;
      if (isMinIE4) {
        var str = layer.style.clip;
        if (!str)
          return layer.style.pixelWidth;
        var clip = getIEClipValues(layer.style.clip);
        return clip[1] - clip[3];
      }
      return -1;
    }
    
    function getClipHeight(layer) {
    
      if (isMinNS4)
        return layer.clip.height;
      if (isMinIE4) {
        var str =  layer.style.clip;
        if (!str)
          return layer.style.pixelHeight;
        var clip = getIEClipValues(layer.style.clip);
        return clip[2] - clip[0];
      }
      return -1;
    }
    
    function getIEClipValues(str) {
    
      var clip = new Array();
      var i;
    
      // Parse out the clipping values for IE layers.
    
      i = str.indexOf("(");
      clip[0] = parseInt(str.substring(i + 1, str.length), 10);
      i = str.indexOf(" ", i + 1);
      clip[1] = parseInt(str.substring(i + 1, str.length), 10);
      i = str.indexOf(" ", i + 1);
      clip[2] = parseInt(str.substring(i + 1, str.length), 10);
      i = str.indexOf(" ", i + 1);
      clip[3] = parseInt(str.substring(i + 1, str.length), 10);
      return clip;
    }
    
    //-----------------------------------------------------------------------------
    // Layer scrolling.
    //-----------------------------------------------------------------------------
    
    function scrollLayerTo(layer, x, y, bound) {
    
      var dx = getClipLeft(layer) - x;
      var dy = getClipTop(layer) - y;
    
      scrollLayerBy(layer, -dx, -dy, bound);
    }
    
    function scrollLayerBy(layer, dx, dy, bound) {
    
      var cl = getClipLeft(layer);
      var ct = getClipTop(layer);
      var cr = getClipRight(layer);
      var cb = getClipBottom(layer);
    
      if (bound) {
        if (cl + dx < 0)
          dx = -cl;
        else if (cr + dx > getWidth(layer))
          dx = getWidth(layer) - cr;
        if (ct + dy < 0)
          dy = -ct;
        else if (cb + dy > getHeight(layer))
          dy = getHeight(layer) - cb;
      }
      clipLayer(layer, cl + dx, ct + dy, cr + dx, cb + dy);
      moveLayerBy(layer, -dx, -dy);
    }
    
    //-----------------------------------------------------------------------------
    // Layer background.
    //-----------------------------------------------------------------------------
    
    function setBgColor(layer, color) {
    
      if (isMinNS4)
        layer.bgColor = color;
      if (isMinIE4)
        layer.style.backgroundColor = color;
    }
    
    function setBgImage(layer, src) {
    
      if (isMinNS4)
        layer.background.src = src;
      if (isMinIE4)
        layer.style.backgroundImage = "url(" + src + ")";
    }
    
    //-----------------------------------------------------------------------------
    // Layer utilities.
    //-----------------------------------------------------------------------------
    
    function getLayer(name) {
    
      if (isMinNS4)
        return findLayer(name, document);
      if (isMinIE4)
        return eval('document.all.' + name);
      return null;
    }
    
    function findLayer(name, doc) {
    
      var i, layer;
    
      for (i = 0; i < doc.layers.length; i++) {
        layer = doc.layers[i];
        if (layer.name == name)
          return layer;
        if (layer.document.layers.length > 0)
          if ((layer = findLayer(name, layer.document)) != null)
            return layer;
      }
      return null;
    }
    
    //-----------------------------------------------------------------------------
    // Image utilities.
    //-----------------------------------------------------------------------------
    
    function getImage(name) { //OK
    
     //alert(name);
      if (isMinNS4) {
        return findImage(name, document);
      }
      if (isMinIE4)
        return eval('document.all.' + name);
      return null;
    }
    
    function findImage(name, doc) { //OK
    
      var i, img;
    
      for (i = 0; i < doc.images.length; i++)
        if (doc.images[i].name == name)
          return doc.images[i];
      for (i = 0; i < doc.layers.length; i++)
        if ((img = findImage(name, doc.layers[i].document)) != null) {
          img.container = doc.layers[i];
          return img;
        }
      return null;
    }
    
    function getImagePageLeft(img) { //OK
    
      var x, obj;
    
      if (isMinNS4) {
        if (img.container != null)
          return img.container.pageX + img.x;
        else
          return img.x;
      }
      if (isMinIE4) {
        x = 0;
        obj = img;
        while (obj.offsetParent != null) {
          x += obj.offsetLeft;
          obj = obj.offsetParent;
        }
        x += obj.offsetLeft;
        return x;
      }
      return -1;
    }
    
    function getImagePageTop(img) { //OK
    
      var y, obj;
    
      if (isMinNS4) {
        if (img.container != null)
          return img.container.pageY + img.y;
        else
          return img.y;
      }
      if (isMinIE4) {
        y = 0;
        obj = img;
        while (obj.offsetParent != null) {
          y += obj.offsetTop;
          obj = obj.offsetParent;
        }
        y += obj.offsetTop;
        return y;
      }
      return -1;
    }
    
    //-----------------------------------------------------------------------------
    // Window and page properties.
    //-----------------------------------------------------------------------------
    
    function getWindowWidth() {
    
      if (isMinNS4)
        return window.innerWidth;
      if (isMinIE4)
        return document.body.clientWidth;
      return -1;
    }
    
    function getWindowHeight() {
    
      if (isMinNS4)
        return window.innerHeight;
      if (isMinIE4)
        return document.body.clientHeight;
      return -1;
    }
    
    function getPageWidth() {
    
      if (isMinNS4)
        return document.width;
      if (isMinIE4)
        return document.body.scrollWidth;
      return -1;
    }
    
    function getPageHeight() {
    
      if (isMinNS4)
        return document.height;
      if (isMinIE4)
        return document.body.scrollHeight;
      return -1;
    }
    
    function getPageScrollX() {
    
      if (isMinNS4)
        return window.pageXOffset;
      if (isMinIE4)
        return document.body.scrollLeft;
      return -1;
    }
    
    function getPageScrollY() {
    
      if (isMinNS4)
        return window.pageYOffset;
      if (isMinIE4)
        return document.body.scrollTop;
      return -1;
    }
    
    </SCRIPT>
    
    <SCRIPT language=JavaScript>
    var myScroller1 = new Scroller(0, 1, 158,194, 0, 0);
    myScroller1.setColors("#000000", "#FFFFFF", "#00005B");
    myScroller1.setFont("Helvetica,Arial", 1);
    myScroller1.setSpeed(500);
    myScroller1.setPause(1500);
    myScroller1.addItem("<a href='?page=programmes_neufs&id_rubrique=10&id_article=2' target='_parent'><img title='Cliquez pour voir les biens'   border=0 height=198 width=158 src='squelettes/images/Diapo1.png'> 'salut' ");
    myScroller1.addItem("<a href='?page=programmes_neufs&id_rubrique=11&id_article=4'  target='_parent'><img title='Cliquez pour voir les biens'   border=0 height=198 width=158 src='squelettes/images/Diapo2.png'>");
    myScroller1.addItem("<a href='?page=bienavendre&id_groupe=2&id_rubrique=12&id_article=7&T1=&T2=2&T3=&T4=' target='_parent'><img title='Cliquez pour voir les biens'   border=0 height=198 width=158 src='squelettes/images/Diapo3.png'>");
    myScroller1.addItem("<a  href='?page=bienavendre&id_groupe=3&id_rubrique=21&id_article=22' target='_parent' > <img title='Cliquez pour voir les biens'  border=0 height=198 width=158 src='squelettes/images/Diapo4.png' >");
    
    function runscroll() {
     
     //alert("hiii");
      var layer;
    var layern;
      var scrollx, scrolly;
      // Locate placeholder img so we can use it to position the scrollers.
      layer = getImage("placeholder");
       scrollx = getImagePageLeft(layer);
      scrolly = getImagePageTop(layer);
      // Create the first scroller and position it.
      myScroller1.create();
      myScroller1.hide();
      myScroller1.moveTo(scrollx, scrolly);
      //myScroller1.moveTo(100, 100);
      myScroller1.setzIndex(100);
      myScroller1.show();
    }
    //window.onload=runscroll
    StkFunc(runscroll);
    </SCRIPT>
    <img height=192 src="squelettes/Lib/transparent.gif" width=156  border=0 name="placeholder" >
    
    </DIV>
    </BODY>
    et dans ce code tu trouvera "StkFunc(runscroll);", sachant que ce code marche bien donc j ai pas de poroblème,j'avais déjà ce problème de conflit entre code javascript et je le régle avec la fonction "StkFunc" pour que je puisse exécuter plusieurs scripts javascript en meme temps.
    donc j'ai pensé de faire la meme chose avec:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <body bgcolor="#ffffff" StkFunc(changeCouleur('1','2','3','4','5','6')); >
    mais ça n a pas marché

  5. #25
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Février 2008
    Messages
    47
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 47
    Points : 28
    Points
    28
    Par défaut
    Moi je cherchais a faire un effet de rollover sur le background d'un td, on ma indiqué la solution que tu proposer jumano, soit:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <td align="center" width="67" class="Style1" onmouseover="this.className='Style2';" onmouseout="this.className='Style1';" >
    <a href="?page=accueil">accueil</a></td>
    (avec les classe correspondante dans un fichier css)

    Sa marche correctement, mais j'ai un petit effet etrange au niveau du favicon dans l'onglet de ie, effctivement, a chaque fois que je rentre ou que je sort du td, le favicon tremble/saute :s

    Quelqu'un a déja vu sa est sait comment le resoudre??

  6. #26
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    Bonjour Jumano,

    Svp comment résoudre ce problème?

    Trés cordialement.

  7. #27
    Membre expérimenté
    Avatar de Jumano
    Profil pro
    Inscrit en
    Février 2007
    Messages
    1 163
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Février 2007
    Messages : 1 163
    Points : 1 595
    Points
    1 595
    Par défaut
    Petite erreur de ma part, j'avais oublié les parenthèes après la fonction runscroll.
    Ce qui donne dans la balise <body> :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    onLoad="changeCouleur('1','2','3','4','5','6'); runscroll();"
    Ensuite dans ton code de défilement, commente la dernière ligne comme ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    //window.onload=runscroll
    //StkFunc(runscroll);

  8. #28
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    Bravo à toi Jumano,svp si je veux appliquer ça (càd changer de couleur sur clique) sur les sous menu par exemple du menu "Accueil", comment faire?

    Trés cordialement.

  9. #29
    Membre expérimenté
    Avatar de Jumano
    Profil pro
    Inscrit en
    Février 2007
    Messages
    1 163
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Février 2007
    Messages : 1 163
    Points : 1 595
    Points
    1 595
    Par défaut
    Faudrait voir le code pour voir ce que l'on peut faire ...

  10. #30
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    j'utilise spip comme framwork,donc c'est un peu compliqué mais bon voici mon code:

    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
    <table cellpadding="0" cellspacing="0">
    				  <tr>
    						 <BOUCLE_ss_rubriques(RUBRIQUES){id_parent=3}>
    						
    							<td>
    									<font color="#FFFFFF">
    									<a style="text-decoration:none; color:#FFFFFF; font-size:12; font-family:Arial, Helvetica, sans-serif" href="?page=programmes_neufs&id_rubrique=#ID_RUBRIQUE ">
    									<b  onMouseUp="this.style.color='#ccffff';" onMouseOver="this.style.color='#ccffff';"
                      onmouseout="this.style.color='#FFFFFF';">#TITRE</b>
    				                   </a>
    								   </font>
    							</td>
    							<td width="25px">&nbsp;</td>		
    							
    						</BOUCLE_ss_rubriques>
    				</tr>
    			</table>
    la balise "BOUCLE_ss_rubriques(RUBRIQUES){id_parent=3}" c'est une requete qui va lister toute les villes liées à la rubrique Accueil,donc les sous menu du menu principale "Accueil" sont les noms des villes (#titre)

    j'espère d'etre un peu claire.

    Trés cordialement.

  11. #31
    Membre expérimenté
    Avatar de Jumano
    Profil pro
    Inscrit en
    Février 2007
    Messages
    1 163
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Février 2007
    Messages : 1 163
    Points : 1 595
    Points
    1 595
    Par défaut
    Lorsque tu cliques sur un sous-menu ta page, c'est une nouvelle page qui est affichée, et ton sous-menu disparait, correct ?

  12. #32
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    la page se telecharge mais les sous menu ne disparaissent pas

  13. #33
    Membre expérimenté
    Avatar de Jumano
    Profil pro
    Inscrit en
    Février 2007
    Messages
    1 163
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Février 2007
    Messages : 1 163
    Points : 1 595
    Points
    1 595
    Par défaut
    Tu aurais un lien vers ton site en ligne que je voie ce que cela donne ...

  14. #34
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    voici le site: http://www.eci-immobilier.fr/?page=accueil

    vous pouvez voir les sous menu au niveau du programmes neufs.

  15. #35
    Membre expérimenté
    Avatar de Jumano
    Profil pro
    Inscrit en
    Février 2007
    Messages
    1 163
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Février 2007
    Messages : 1 163
    Points : 1 595
    Points
    1 595
    Par défaut
    On va prendre l'exemple de la page programmes_neufs.
    Tu ajoutes sur les <td> des sousmenu une "id", pour Touts : 7 et pour St Cyr : 8.
    Ensuite tu définies tu 2 styles dans ton CSS : Style1(par défaut) et Style2.
    Sur chaque <td> tu indiques class="Style1".
    Ensuite tu créées ta fonction comme ceci (pour deux id) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    <script language="javascript" type="text/javascript">
    function sousmenu_programmes(id1,id2)
    {
    document.getElementById(id1).className = 'Style2';
    document.getElementById(id2).className = 'Style1';
    }
    </script>
    pour les autres sousmenus tu ajouteras autant de ligne document.getElementById(id...).className = 'Style1'; que tu auras de <td>.

    Ensuite dans la balise <body> tu appelles ta fonction :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <body onLoad="sousmenu_programmes(7,8);">

  16. #36
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    mais les deux villes:Tours et saint-Cyr ne sont pas statique,ils sont dynamique leur valeur vienne de la boucle que j ai décrit tout à l'heure, donc j ai une seule <td> qui va se répeter en fonction du nombre des villes.

  17. #37
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    Bonjour Jumano,

    Svp, comment faire si je veux stocker dans un tableau les valeurs des id de chaque ville et ce tableau je le passe en parametre à la fonction qui va changer la couleur en cliquant sur les sous menu?


    Trés cordialement.

  18. #38
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    Svp Jumano comment faire pour stocker dans un tableau les valeurs des id de chaque ville et ce tableau je le passe en parametre à la fonction qui va changer la couleur en cliquant sur les sous menu?

  19. #39
    Membre expérimenté
    Avatar de Jumano
    Profil pro
    Inscrit en
    Février 2007
    Messages
    1 163
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Février 2007
    Messages : 1 163
    Points : 1 595
    Points
    1 595
    Par défaut
    Bonjour,
    Non je ne t'avais pas oublié ....
    Après plusieurs essais sur différentes pistes, je pense avoir trouvé la solution en effectuant la fonction à partir de l'url de la page ...
    On récupère l'url de la page qui s'affiche, on fait une boucle sur tous les lien <a> de la page, et on modifie le style de celui qui correspond ...

    Ce qui donne :
    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
    <style>
    .Style1 {
    color:#3300FF;
    }
     
    .Style2 {
    color: #FF3366;
    }
    </style>
    </head>
     
    <body onload="test();">
    <script language="javascript" type="text/javascript">
    function test() {
    var urlpage = window.location;
     
    for (i=0; i<document.getElementsByTagName("a").length; i++)
    if (document.getElementsByTagName("a")[i].href == urlpage)
    {
    document.getElementsByTagName("a")[i].className = 'Style2';
    }
    }
    </script>
    <a href="?page=test10" class="Style1">Test10</a>
    <a href="?page=test11" class="Style1">Test11</a>
    <a href="?page=test12" class="Style1">Test12</a>
    Teste ce code et dis moi si c'est bon ....

  20. #40
    Membre du Club
    Inscrit en
    Janvier 2008
    Messages
    97
    Détails du profil
    Informations forums :
    Inscription : Janvier 2008
    Messages : 97
    Points : 42
    Points
    42
    Par défaut
    Bonjour Jumano,

    Merci beaucoup pour ton aide, j'ai intégrer ton code mais ça n'a pas marché,voiçi mon code:

    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
    <head>
    <title>Programmes neufs</title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
    <script language="javascript" type="text/javascript" src="squelettes/Lib/include.js"></script>
    <style>
    .Style1 
     {
    	color:#FFFFFF;	
     }
    .Style2 
     {
    	color:#CCFFFF;	
     }
    </style>
    <script language="javascript" type="text/javascript">
    function test() {
    var urlpage = window.location;
     
    for (i=0; i<document.getElementsByTagName("a").length; i++)
    if (document.getElementsByTagName("a")[i].href == urlpage)
    {
    document.getElementsByTagName("a")[i].className = 'Style2';
    }
    }
    </script>
     
    <link rel="stylesheet" type="text/css" href="squelettes/css/style.css" />
    </head>
    <!--body bgcolor="#ffffff"-->
    <body onLoad="changeCouleur('3','1','2','4','5','6');runscroll();test()">
    <table border="0" cellpadding="0" cellspacing="0" width="1000">
      <tr>
        <td colspan="3"><INCLURE (Entete.html)>
        </td>
      </tr>
      <tr>
       <td  bgcolor="#003366" width="770" height="70" valign="top">
       		<div align="center" style="margin-top=10px">
       			<table cellpadding="0" cellspacing="0">
    				  <tr>
    						 <BOUCLE_ss_rubriques(RUBRIQUES){id_parent=3}>
     
    							<td>
    									<font color="#FFFFFF">
    									<a class="Style1" style="text-decoration:none; color:#FFFFFF; font-size:12; font-family:Arial, Helvetica, sans-serif" href="?page=programmes_neufs&id_rubrique=#ID_RUBRIQUE ">
    									<b   >#TITRE</b>
    				                   </a>
    								   </font>
    							</td>
    							<td width="25px">&nbsp;</td>		
     
    						</BOUCLE_ss_rubriques>
    				</tr>
    			</table>
    		</div>
       </td>
    est ce que c'est comme ça?

    Trés cordialement.

+ Répondre à la discussion
Cette discussion est résolue.
Page 2 sur 3 PremièrePremière 123 DernièreDernière

Discussions similaires

  1. Changer une couleur sur une photo
    Par Forum75 dans le forum ImageJ
    Réponses: 2
    Dernier message: 27/06/2012, 08h47
  2. Réponses: 0
    Dernier message: 14/05/2011, 01h13
  3. Changer la couleur sur un noeud Treeview
    Par calvi2002 dans le forum VB.NET
    Réponses: 2
    Dernier message: 25/08/2010, 11h06
  4. [jTable] changer les couleurs sur un double clique
    Par lkryss dans le forum Composants
    Réponses: 37
    Dernier message: 04/05/2008, 22h49
  5. Aide pour changer de couleur sur les primitifs GLUT
    Par romainhoarau2764 dans le forum GLUT
    Réponses: 3
    Dernier message: 19/03/2005, 13h30

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