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 :

script de calendrier souci d'affichage


Sujet :

JavaScript

  1. #1
    Débutant
    Inscrit en
    Juin 2007
    Messages
    453
    Détails du profil
    Informations forums :
    Inscription : Juin 2007
    Messages : 453
    Points : 97
    Points
    97
    Par défaut script de calendrier souci d'affichage
    Bonjour a tous,
    J'ai une probléme dans l'utilisation du script de calendrier
    http://easynews.free.fr/calendrierv2/.
    mon problème est lorsque j'ai un autre formulaire prés du formulaire ou j'utilise le calendrier , dans ce cas le calendrier s'affiche au dessous du formulaire et l'utilisateur ne peut pas voir tout le calendrier car il est caché par le formulaire surtout dans le cas ou ce formulaire est un champ du texet assez grand.
    toute information sera le bien et merci d'avance.

  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 638
    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 638
    Points : 66 667
    Points
    66 667
    Billets dans le blog
    1
    Par défaut
    FAut pas aller chercher des calendriers comme ça qui ne fonctionnent qu'a moitié alors qu'un a ce qu'il faut chez nous ...
    http://www.developpez.net/forums/d64...s-mieux-mieux/
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  3. #3
    Expert confirmé
    Avatar de le_chomeur
    Profil pro
    Développeur informatique
    Inscrit en
    Février 2006
    Messages
    3 653
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Février 2006
    Messages : 3 653
    Points : 4 835
    Points
    4 835
    Par défaut
    lol spaffy c'est justement moi qui l'ai réalisé
    c'était la version 2 il restait quelques bug, voici la version finale modifié par bovino :

    http://dmouronval.developpez.com/calendrier/
    est ton ami fait gagner du temps à ceux qui aident , donc un message avec la balise résolu laisse plus de temps pour résoudre d'autres problèmes

    Premier ministre du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts )

  4. #4
    Débutant
    Inscrit en
    Juin 2007
    Messages
    453
    Détails du profil
    Informations forums :
    Inscription : Juin 2007
    Messages : 453
    Points : 97
    Points
    97
    Par défaut
    même problème monsieur avec cette version

  5. #5
    Expert confirmé
    Avatar de le_chomeur
    Profil pro
    Développeur informatique
    Inscrit en
    Février 2006
    Messages
    3 653
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Février 2006
    Messages : 3 653
    Points : 4 835
    Points
    4 835
    Par défaut
    tu peux nous montrer le code de ton formulaire ?
    est ton ami fait gagner du temps à ceux qui aident , donc un message avec la balise résolu laisse plus de temps pour résoudre d'autres problèmes

    Premier ministre du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts )

  6. #6
    Débutant
    Inscrit en
    Juin 2007
    Messages
    453
    Détails du profil
    Informations forums :
    Inscription : Juin 2007
    Messages : 453
    Points : 97
    Points
    97
    Par défaut
    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
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Document sans titre</title>
    <script type="text/javascript">
    	var calendarTemp, calendarElement, calendarDestruct = false, preventDouble = true;
    	document.onclick = function(e){
    		var source=window.event?window.event.srcElement:e.target;
    		if(!source.calendrier && calendarDestruct && preventDouble){
    			calendarDestruct = false;
    			calendarElement.calendarActive = false;
    			while (document.getElementById('Calendrier').childNodes.length>0) {
    				document.getElementById('Calendrier').removeChild(document.getElementById('Calendrier').firstChild);
    			}
    			document.body.removeChild(document.getElementById('Calendrier'));
    		}
    		else if(!preventDouble){preventDouble = true}
    	}
    	function calendar(element){
    		if(document.getElementById('Calendrier') && element != calendarElement){
    			while (document.getElementById('Calendrier').childNodes.length>0) {
    				document.getElementById('Calendrier').removeChild(document.getElementById('Calendrier').firstChild);
    			}
    			document.body.removeChild(document.getElementById('Calendrier'));
    			calendarElement.calendarActive = false;
    			preventDouble = false;
    		}
    		else{preventDouble = true;}
    		calendarTemp = element;
    		if(!calendarElement){calendarElement = element}
    		if(!element.calendarActive){
    		//Propriété de la date ( année , mois etc ... )
    		this.monthCurrent = null;
    		this.yearCurrent = null;
    		this.dayCurrent = null;
    		this.dateCurrent = null;
    		//Le timer pour les effet ( fade in ^^ )
    		this.timer = null;
    		/*###### Objet composant le calendrier ######*/
    		// la div principale
    		this.calendar = null;
     
    		this.bugFrame = null;
    		//div contenant les mois ainsi que les deux boutons suivant et précédent
    		this.contentMonth = null;
    		this.pMonth = null;
    		this.MonthLeft = null;
    		this.MonthRight = null;
     
    		//Div contenant l'année ainsi que les deux boutons
    		this.contentYear = null;
    		this.pYear = null;
    		this.YearTop = null;
    		this.YearBottom = null;
     
    		//Div contenant le nom des jours
    		this.contentNameDay = null;
     
    		//Div contenant la liste des jours
    		this.contentListDay = null;
     
    		/*###### FIN des Objet du calendrier ######*/
     
    		//Liste des dates courantes
    		this.from = null;
    		//Liste des dates suivantes
    		this.to = null;
     
    		this.opacite = 0 ;
    		this.direction = null;
    		//Variable permettant de mettre a  jour le header + slide
    		this.inMove = false;
    		//Tableau d'élément a déplacé
    		this.elementToSlide = new Array();
    		//Index de l'élément en cours
    		this.currentIndex = 0;
    		//Paramètre pour lancement automatique
    		this.timePause = 0 ; //permet de définir le temps de pause entre deux slide
    		this.auto = false ; //Permet d'activer ou non le slide automatique
     
    		//Input sur lequel on a cliqué
    		this.element = (element) ? element: null;
    		element.calendarActive = true;
    		//Tableaux contenant le nom des mois et jours
    		this.monthListName = new Array('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
    		this.dayListName = new Array('Lu','Ma','Me','Je','Ve','Sa','Di');
    		this.dayFullName = new Array('Lun','Mar','Mer','Jeu','Ven','Sam','Dim');
     
    		this.IsIE=!!document.all;
     
    		this.init();
    		}
    	}
     
    	calendar.prototype.init = function (){
    		var me = this;
    		//On créer une div principale
    		this.calendar = this.newElement({"typeElement":"div","classeCss":"calendar","parent":null});
    		this.calendar.id = 'Calendrier';
    		//Pour combler un bug ie , on doit ajouter les filtres d'opacité
    		//Ajout du filtre
    	      if(this.IsIE)
    	      {
    	        this.calendar.style.filter='alpha(opacity=0)';
    	        this.calendar.filters[0].opacity=0;
    	      }
    	      else
    	      {
    	        this.calendar.style.opacity='0';
    	      }
    		//Création d'une frame pour combler un bug lié aux liste sous ie
    		this.bugFrame = this.newElement({"typeElement":"iframe","classeCss":"bugFrame","parent":this.calendar});
    		//Création d'une divContenant le fond  pour combler un bug sous ie
    		var temp = this.newElement({"typeElement":"div","classeCss":"bugFrame","parent":this.calendar});
    		//Création des contenants ( mois , année , jours , listes jours etc ... )
     
    		this.contentDay = this.newElement({"typeElement":"div","classeCss":"contentDay","parent":this.calendar});
    		this.contentMonth = this.newElement({"typeElement":"div","classeCss":"contentMonth","parent":this.calendar});
    		this.pMonth = this.newElement({"typeElement":"span","classeCss":"pMonth","parent":this.contentMonth});
    		this.contentYear = this.newElement({"typeElement":"div","classeCss":"contentYear","parent":this.calendar});
    		this.pYear = this.newElement({"typeElement":"span","classeCss":"pYear","parent":this.contentYear});
    		this.contentNameDay = this.newElement({"typeElement":"ul","classeCss":"contentNameDay","parent":this.calendar});
    		this.contentListDay = this.newElement({"typeElement":"div","classeCss":"contentListDay","parent":this.calendar});
     
    		//Ajout des éléments dans les conteneurs ( bouton + initialisation des dates )
    		this.MonthLeft = this.newElement({"typeElement":"div","classeCss":"MonthLeft","parent":this.contentMonth});
    		this.MonthRight = this.newElement({"typeElement":"div","classeCss":"MonthRight","parent":this.contentMonth});
    		//Ajout des évènements sur les div
    		this.MonthLeft.onclick = function(){me.updateMonthBefNexCur("before");me.SlideToRight();return false};
    		this.MonthRight.onclick = function(){me.updateMonthBefNexCur("next");me.SlideToLeft();return false};
     
    		this.YearTop = this.newElement({"typeElement":"div","classeCss":"YearTop","parent":this.contentYear});
    		this.YearBottom = this.newElement({"typeElement":"div","classeCss":"YearBottom","parent":this.contentYear});
     
    		this.YearTop.onclick = function(){me.updateYearBefNexCur("next");me.SlideToTop();return false};
    		this.YearBottom.onclick = function(){me.updateYearBefNexCur("before");me.SlideToBottom();return false};
     
     
    		//Ajout des évènements liés au survol et appuis de la souris sur les éléments;
    		this.MonthLeft.onmouseover = function(){this.className = "MonthLeftOver"};
    		this.MonthLeft.onmouseout = function(){this.className = "MonthLeft"};
    		this.MonthLeft.onmousedown = function(){this.className = "MonthLeftClick"};
    		this.MonthLeft.onmouseup = function(){this.className = "MonthLeftOver"};
     
    		this.MonthRight.onmouseover = function(){this.className = "MonthRightOver"};
    		this.MonthRight.onmouseout = function(){this.className = "MonthRight"};
    		this.MonthRight.onmousedown = function(){this.className = "MonthRightClick"};
    		this.MonthRight.onmouseup = function(){this.className = "MonthRightOver"};
     
    		this.YearTop.onmouseover = function(){this.className = "YearTopOver"};
    		this.YearTop.onmouseout = function(){this.className = "YearTop"};
    		this.YearTop.onmousedown = function(){this.className = "YearTopClick"};
    		this.YearTop.onmouseup = function(){this.className = "YearTopOver"};
     
    		this.YearBottom.onmouseover = function(){this.className = "YearBottomOver"};
    		this.YearBottom.onmouseout = function(){this.className = "YearBottom"};
    		this.YearBottom.onmousedown = function(){this.className = "YearBottomClick"};
    		this.YearBottom.onmouseup = function(){this.className = "YearBottomOver"};
     
    		//Récupération de la date du champs sinon date par défaut
     
    		//Si l'élément sur lequel on a cliquez n'est pas vide on extrait la date
    		if(this.element != null && this.element.value != ""){
    			var reg=new RegExp("/", "g");
    			var dateOfField = this.element.value;
    			var dateExplode = dateOfField.split(reg);
    			this.dateCurrent = this.getDateCurrent(dateExplode[0], dateExplode[1] - 1,dateExplode[2]);
    		}
    		else{
    			this.dateCurrent = this.getDateCurrent();
    		}
     
    		//Récupération de la date du champs , sinon création d'une nouvelle;
    		this.monthCurrent = this.dateCurrent.getMonth();
    		this.yearCurrent = this.dateCurrent.getFullYear();
    		this.dayCurrent = this.dateCurrent.getDate();
     
    		//Création du mois courant
    		this.from = this.createContentDay(0,"left");
    		this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.from});
    		//Création de la div qui défilera  On le remplira au moment ou on en aura besoins
    		this.to = this.createContentDay(parseInt(this.calendar.offsetWidth),"left");
    		this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
     
    		//On ajoute les éléments souhaités ( ici un tableau )  on peut utiliser la méthode AddElement pour ajouter un seul élément. on peut ajouter un id ou directement l'élément ;-)
    		this.AddElements(Array(this.from,this.to));
     
    		//Création de l'entete
    		this.createHeader();
    		this.updateDateHeader();
     
    		//Positionnement du calendrier
    		this.getPosition();
     
    		//Apparition
    		this.fadePic(0,true);
    	}
     
    	calendar.prototype.getDateCurrent = function (day,month,year){
     
    			//Aujourd'hui si month et year ne sont pas renseignés
    			if(year == null || month == null){
    				return (new Date());
    			}
     
    			else{
    				//Création d'une date en fonction de celle passée en paramètre
    				return (new Date(year, month , day));
    			}
    	}
     
    	calendar.prototype.newElement = function (parameter){
    		var typeElement = parameter['typeElement'];
    		var classToAffect = parameter['classeCss'];
    		var parent = parameter['parent'];
     
    		var newElement = document.createElement(typeElement);
    		newElement.className = classToAffect;
    		newElement.calendrier = true;
    		if(parent == null){
    			document.body.appendChild(newElement);
    		}
    		else{
    			parent.appendChild(newElement);
    		}
    		return newElement;
    	}
     
    	calendar.prototype.createMonth = function(parameter){
    		//Récupération des paramètres
    		var CurrentDay = parameter["CurrentDay"];
    		var CurrentMonth = parameter["CurrentMonth"];
    		var CurrentYear = parameter["CurrentYear"];
    		var conteneur = parameter["conteneur"];
     
    		//On commence par détruire toute les date du conteneur :)
    		/*for(var i = 0 , l = conteneur.childNodes.length; i < l;i++ ){
    			conteneur.removeChild(conteneur.childNodes[i]);
    		}*/
    		while (conteneur.childNodes.length>0) {
    			conteneur.removeChild(conteneur.firstChild);
    		}
    		//conteneur.innerHTML = '';
     
    		//Appel de la méthode getDateCurrent retournant la date courante ou la date passé en paramètre
    		var dateCurrent = this.getDateCurrent(CurrentDay,CurrentMonth,CurrentYear);
     
    		//Mois actuel
    		var monthCurrent = dateCurrent.getMonth()
     
    		//Année actuelle
    		var yearCurrent = dateCurrent.getFullYear();
     
    		//Jours actuel
    		var dayCurrent = dateCurrent.getDate();
     
    		// On récupère le premier jour de la semaine du mois
    		var dateTemp = new Date(yearCurrent, monthCurrent,1);
     
    		//test pour vérifier quel jour était le premier du mois par rapport a la semaine
    		this.current_day_since_start_week = (( dateTemp.getDay()== 0 ) ? 6 : dateTemp.getDay() - 1);
     
    		//On initialise le nombre de jour par mois et on vérifis si l'on est au mois de février
    		var nbJoursfevrier = (yearCurrent % 4) == 0 ? 29 : 28;
    		//Initialisation du tableau indiquant le nombre de jours par mois
    		var day_number = new Array(31,nbJoursfevrier,31,30,31,30,31,31,30,31,30,31);
     
    		//On commence par ajouter les nombre de jours du mois précédent
     
    		//Calcul des date en fonction du moi précédent
     
    		var dayBeforeMonth = ((day_number[((monthCurrent == 0) ? 11:monthCurrent-1)]) - this.current_day_since_start_week)+1;
     
    		for(i  = dayBeforeMonth ; i <= (day_number[((monthCurrent == 0) ? 11:monthCurrent-1)]) ; i ++){
     
    			this.createDayInContent(i,false,false,conteneur);
    		}
     
    		//On remplit le calendrier avec le nombre de jour, en remplissant les premiers jours par des champs vides
    		for(var nbjours = 0 ; nbjours < (day_number[monthCurrent] + this.current_day_since_start_week) ; nbjours++){
    		//et enfin on ajoute les dates au calendrier
    		//Pour gèrer les jours "vide" et éviter de faire une boucle on vérifit que le nombre de jours corespond bien au
    		//nombre de jour du mois
    			if(nbjours < day_number[monthCurrent]){
    				if(dayCurrent == (nbjours+1)){
    					this.createDayInContent(nbjours+1,true,true,conteneur);
    				}
    				else{
    					this.createDayInContent(nbjours+1,false,true,conteneur);
    				}
    			}
    		}
     
    		//Calcul des date en fonction du moi suivant
    		var nbCelRest = 42 - (day_number[monthCurrent]+this.current_day_since_start_week);
     
    		for(i  = 0 ; i <  nbCelRest ; i ++){
     
    			this.createDayInContent(i+1,false,false,conteneur);
    		}
     
    	}
     
    	calendar.prototype.createDayInContent = function (dateDay,CurrentDay,active,conteneur){
    		var me = this;
    		//Création d'un li comprenant un noeud texte avec la date du jour
    		var liDay = document.createElement("li");
    		liDay.calendrier = true;
    		var TextContent = document.createTextNode(dateDay);
    		//Pour éviter les if else ....
    		liDay.className = (CurrentDay) ? "dayCurrent":"liOut";
    		liDay.className = (!active) ? "liInactive":liDay.className;
    		liDay.appendChild(TextContent);
    		//Ajout du survol :)
    		if(active){
    			liDay.onmouseover = function(){this.className = (this.className == "dayCurrent") ? this.className : "liHover";};
    			liDay.onmouseout = function(){this.className = (this.className == "dayCurrent") ? this.className : "liOut";};
    			liDay.onclick = function(){me.dayCurrent = this.innerHTML ; me.fillField()};
    		}
    		//Ajout de l'élément dans la liste
    		conteneur.appendChild(liDay);
    	}
     
    	calendar.prototype.createContentDay = function (positionTo,position){
    		//Création d'un li comprenant un noeud texte avec la date du jour
    		var ulDays = document.createElement("ul");
    		ulDays.calendrier = true;
    		ulDays.className = "dayCal";
     
    		if(position != "top"){
    			if(positionTo != null){ulDays.style.left = positionTo + "px";}
    			ulDays.style.top = 0 + "px";
    		}
    		else{
    			if(positionTo != null){ulDays.style.top = positionTo + "px";}
    			ulDays.style.left = 0 + "px";
    		}
    		this.contentListDay.appendChild(ulDays);
    		return ulDays;
    	}
     
    	calendar.prototype.createCalendar = function (){
    		//Création d'un li comprenant un noeud texte avec la date du jour
    		var divContent = document.createElement("div");
    		divContent.calendrier = true;
    		divContent.className = "calendrier";
    		document.body.appendChild(divContent);
    		return divContent;
    	}
     
    	calendar.prototype.createHeader = function(){
     
    		//Ajout des jours
    		for(var i = 0 , l = this.dayListName.length ; i < l ; i++){
    			var liDayTemp = document.createElement("li");
    			liDayTemp.calendrier = true;
    			TextContent = document.createTextNode(this.dayListName[i]);
    			liDayTemp.appendChild(TextContent);
    			//Ajout du jour dans la liste
    			this.contentNameDay.appendChild(liDayTemp);
    		}
    	}
     
    	calendar.prototype.updateDateHeader = function(){
    		var me = this ;
    		//On commence par détruire tous les enfants des mois et années
    		while (this.pMonth.childNodes.length>0) {
    			this.pMonth.removeChild(this.pMonth.firstChild);
    		}
     
    		while (this.pYear.childNodes.length>0) {
    			this.pYear.removeChild(this.pYear.firstChild);
    		}
     
    		while (this.contentDay.childNodes.length>0) {
    			this.contentDay.removeChild(this.contentDay.firstChild);
    		}
     
    		//Ajout de la date du jour
    		var nomDuJour =  this.dayFullName[((this.dateCurrent.getDay()-1) == -1) ? 6 :(this.dateCurrent.getDay()-1)];
    		var TextContent = document.createTextNode(nomDuJour);
    		this.contentDay.appendChild(TextContent);
    		var retourLigne = document.createElement("br");
    		this.contentDay.appendChild(retourLigne);
    		TextContent = document.createTextNode(this.dayCurrent);
    		this.contentDay.appendChild(TextContent);
     
     
    		//Ajout du mois 
    		TextContent = document.createTextNode(this.monthListName[(this.monthCurrent == 12) ? 0:this.monthCurrent]);
    		this.pMonth.appendChild(TextContent);
     
    		//Ajout de l'année 
    		TextContent = document.createTextNode(this.yearCurrent);
    		this.pYear.appendChild(TextContent);
    	}
     
    	calendar.prototype.updateMonthBefNexCur = function(direction){
     
    			if(!this.inMove){
    				if(this.timer == null){
    					if(direction == "next"){
    						this.updateDate("next");
    						this.direction = "left";
    						//on le remplit
    						this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
    					}
    					else if(direction == "before"){
    						this.updateDate("before");
    						this.direction = "right";
    						this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
     
    					}
    				}
    				//On positionne la div
    				this.Positionne();
    			}
    	}
     
    	calendar.prototype.updateYearBefNexCur = function(direction){
    			if(!this.inMove){
    				if(this.timer == null){
    					if(direction == "next"){
    						this.yearCurrent++;
    						this.direction = "top";
    						//on le remplit
    						this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
    					}
    					else if(direction == "before"){
    						this.yearCurrent--;
    						this.direction = "bottom";
    						this.createMonth({"CurrentDay":this.dayCurrent,"CurrentMonth":this.monthCurrent,"CurrentYear":this.yearCurrent,"conteneur":this.to});
     
    					}
    				}
    				//Mise a jour de la date courante : 
    				this.dateCurrent = new Date(this.yearCurrent, this.monthCurrent,this.dayCurrent);
    				this.dateCurrent.setDate(this.dayCurrent);
    				this.updateDateHeader();
    				this.Positionne();
    			}
    	}
     
    	calendar.prototype.updateDate = function(direction){
    		if(this.timer == null){
    			if(direction == "before"){
    			//on calcul les dates suivante et précédente
    				if(this.monthCurrent == 0){
    					this.monthCurrent = 11;
    				}
    				else{
    					this.monthCurrent = this.monthCurrent - 1 ;
    				}
    				this.yearCurrent = (this.monthCurrent == 11 ) ? this.yearCurrent - 1:this.yearCurrent;
    			}
    			else{
    			//On récupère le mois actuel puis on vérifit que l'on est pas en janvier sinon on ajoute une année
    				if(this.monthCurrent == 11){
    					this.monthCurrent = 0;
     
    				}
    				else{
    					this.monthCurrent =this.monthCurrent + 1;
    				}
    				this.yearCurrent = (this.monthCurrent == 0) ?  this.yearCurrent+1:this.yearCurrent;
    			}
     
    			//Mise a jour de la date courante : 
    			this.dateCurrent = new Date(this.yearCurrent, this.monthCurrent,this.dayCurrent);
    			this.dateCurrent.setDate(this.dayCurrent);
    			this.updateDateHeader();
    		}
    	}
     
    	//Fonction permettant de trouver la position de l'élément ( input ) pour pouvoir positioner le calendrier
    	calendar.prototype.getPosition = function() {
    	var tmpLeft = this.element.offsetLeft;
    	var tmpTop = this.element.offsetTop;
    	var MyParent = this.element.offsetParent;
    	while(MyParent) {
    		tmpLeft += MyParent.offsetLeft;
    		tmpTop += MyParent.offsetTop;
    		MyParent = MyParent.offsetParent;
    	}
    		this.calendar.style.left = tmpLeft;
    		this.calendar.style.top = tmpTop +  this.element.offsetHeight + 2 +"px";
    	}
     
    	calendar.prototype.fillField = function(){
    		this.element.value = this.dayCurrent+"/"+ ((this.monthCurrent+1 == 13) ? 1:this.monthCurrent+1)+"/"+this.yearCurrent;
    		//On détruit le calendrier;
    		while (this.calendar.childNodes.length>0) {
    			this.calendar.removeChild(this.calendar.firstChild);
    		}
    		document.body.removeChild(this.calendar);
    		this.element.calendarActive = false;
    		calendarDestruct = false;
    	}
    	/*##########################################################
    	############  METHODES PERMETTANT DE SCROLLER LES DATES  ##############
    	##########################################################*/
    	//Permet de récupérer un élément par id
    	calendar.prototype.$ = function(element){
    		return document.getElementById(element);
    	};
     
    	//Méthode permettant de lancer les animations si en auto :)
    	calendar.prototype.go = function(){
    		if(this.auto){
    			switch (this.direction ){
    				case 'left':
    					this.SlideToLeft();
    				break;
    				case 'right':
    					this.SlideToRight();
    				break;
    				case 'top':
    					this.SlideToTop();
    				break;
    				case 'bottom':
    					this.SlideToBottom();
    				break;
    			}
    		}
    	}
     
    	//Méthode permettant d'ajouter un élément
    	calendar.prototype.AddElement = function(element){
    		if(typeof(element) == "string"){
    			this.elementToSlide.push(this.$(element));
    		}
    		else if(typeof(element) == "object"){
    			this.elementToSlide.push(element);
    		}
    	}
     
    	//Méthode permettant d'ajouter plusieurs élément d'un coup
    	calendar.prototype.AddElements = function (elements){
    		for(var i = 0 , l = elements.length; i < l ;i++){
    			this.AddElement(elements[i]);
    		}
    	}
     
    	//Méthode permettant de déplacer les éléments vers la gauche
    	calendar.prototype.SlideToLeft = function(){
    		if((this.direction == null || this.direction == 'left') && this.opacite >= 100){
    			var me = this ;
    			//On vérifit la direction pour initialiser le positionnement
    			if(this.direction != 'left'){
    					this.direction = 'left';
    					if(this.timer == null){
    						this.Positionne();
    					}
    			}
    			else if(this.direction == 'left' && this.auto && this.timer == null){
    				this.Positionne();
    			}
     
    			if(this.timer != null){
    				clearTimeout(this.timer);
    				this.timer = null;
    			}
    			//Si le timer n'est pas finit on détruit l'ancienne div
    			if(parseInt(this.from.style.left) == Number.NaN || (parseInt(this.from.parentNode.offsetWidth) + parseInt(this.from.style.left))> 0){
    				this.from.style.left = parseInt(this.from.style.left) - 15 + "px";
    				this.to.style.left  =parseInt(this.to.style.left) - 15 + "px";
    				this.inMove = true;
    				this.timer = setTimeout(function(){me.SlideToLeft()},25);
     
    			}
    			else{
    				clearTimeout(this.timer);
    				this.timer = null;
    				this.currentIndex = (this.currentIndex == (this.elementToSlide.length-1)) ? 0:this.currentIndex + 1;
    				this.Positionne();
    				this.direction = null;
    				this.inMove = false;
    			}
    		}
    	};
     
    	//Méthode permettant de déplacer les éléments vers la droite
    	calendar.prototype.SlideToRight = function(){
    		var me = this ;
    		if((this.direction == null || this.direction == 'right') && this.opacite >= 100){
    				if(this.direction != 'right'){
    					this.direction = 'right';
    					if(this.timer == null){
    						this.Positionne();
    					}
    				}
    				else if(this.direction == 'right' && this.auto && this.timer == null){
    					this.Positionne();
    				}
     
    				if(this.timer != null){
    					clearTimeout(this.timer);
    					this.timer = null;
    				}
    				//Si le timer n'est pas finit on détruit l'ancienne div
    				if(parseInt(this.from.style.left) == Number.NaN ||  parseInt(this.from.style.left) < parseInt(this.from.parentNode.offsetWidth)){
    					this.from.style.left = parseInt(this.from.style.left) + 15 + "px";
    					this.to.style.left  =parseInt(this.to.style.left) + 15 + "px";
    					this.inMove = true;
    					this.timer = setTimeout(function(){me.SlideToRight()},25);
    				}
    				else{
    					clearTimeout(this.timer);
    					this.timer = null;
    					this.currentIndex = (this.currentIndex == 0) ? this.elementToSlide.length-1:this.currentIndex - 1;
    					this.Positionne();
    					this.direction = null;
    					this.inMove = false;
    				}
    		}
     
     
    	};
     
    	//Méthode permettant de déplacer les éléments vers la gauche
    	calendar.prototype.SlideToTop = function(){
    		var me = this ;
    		if((this.direction == null || this.direction == 'top') && this.opacite >= 100){
    			//On vérifit la direction pour initialiser le positionnement
    			if(this.direction != 'top'){
    					this.direction = 'top';
    					if(this.timer == null){
    						this.Positionne();
    					}
    			}
    			if(this.timer != null){
    				clearTimeout(this.timer);
    				this.timer = null;
    			}
    			//Si le timer n'est pas finit on détruit l'ancienne div
    			if(parseInt(this.from.style.top) == Number.NaN || (parseInt(this.from.style.top) > - parseInt(this.from.parentNode.offsetHeight))){
    				this.from.style.top = parseInt(this.from.style.top) - 15 + "px";
    				this.to.style.top  =parseInt(this.to.style.top) - 15 + "px";
    				this.inMove = true;
    				this.timer = setTimeout(function(){me.SlideToTop()},25);
    			}
    			else{
    				clearTimeout(this.timer);
    				this.timer = null;
    				this.currentIndex = (this.currentIndex == 0) ? this.elementToSlide.length-1:this.currentIndex - 1;
    				this.Positionne();					
    				this.direction = null;
    				this.inMove = false;
    			}
    		}
    	};
     
    	//Méthode permettant de déplacer les éléments vers le bas
    	calendar.prototype.SlideToBottom = function(){
    		var me = this 
    		if((this.direction == null || this.direction == 'bottom') && this.opacite >= 100){
    			//On vérifit la direction pour initialiser le positionnement
    			if(this.direction != 'bottom'){
    					this.direction = 'bottom';
    					if(this.timer == null){
    						this.Positionne();
    					}
    			}
    			if(this.timer != null){
    				clearTimeout(this.timer);
    				this.timer = null;
    			}
    			//Si le timer n'est pas finit on détruit l'ancienne div
    			if(parseInt(this.from.style.top) == Number.NaN || parseInt(this.from.style.top) < parseInt(this.from.parentNode.offsetHeight)){
    				this.from.style.top = parseInt(this.from.style.top) + 15 + "px";
    				this.to.style.top  =parseInt(this.to.style.top) + 15 + "px";
    				this.inMove = true;
    				this.timer = setTimeout(function(){me.SlideToBottom()},25);
    			}
    			else{
    				clearTimeout(this.timer);
    				this.timer = null;
    				this.currentIndex = (this.currentIndex == this.elementToSlide.length-1) ? 0:this.currentIndex + 1;
    				this.Positionne();
    				this.direction = null;
    				this.inMove = false;
    			}
    		}
    	};
     
    	//Fonction initialisant le tableau en positionnant tous les éléments :)
    	calendar.prototype.Positionne = function(){
    		if(this.direction == 'left'){
    			//On vérifit que l'on est pas a la fin sinon le premier devient le dernier
    			if(this.currentIndex == this.elementToSlide.length-1){
    				//récupération des éléments : 
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[0]; //Premier élément
    			}
    			else{
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.currentIndex + 1];
    			}
    				this.from.style.display = "block" ;
    				this.from.style.left = 0 + "px";
    				this.to.style.left = this.from.parentNode.offsetWidth + "px";
    				this.to.style.display = "block";
    				//Posionement vertical
    				this.to.style.top = 0 + "px";
    				this.from.style.top = 0 + "px" ;
    		}
    		else if(this.direction == 'right'){
    			if(this.currentIndex == 0){
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.elementToSlide.length-1]; // dernier élément
    			}
    			else{
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.currentIndex-1];
    			}
    			this.from.style.display = "block" ;
    			this.from.style.left = 0 + "px";
    			this.to.style.left = - (this.from.parentNode.offsetWidth )+ "px";
    			this.to.style.display = "block";
    			//Posionement vertical
    			this.to.style.top = 0 + "px";
    			this.from.style.top = 0 + "px" ;
    		}
    		else if(this.direction == 'bottom'){
    			if(this.currentIndex == this.elementToSlide.length-1){
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[0]; // dernier élément
    			}
    			else{
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.currentIndex+1];
    			}
    			this.from.style.display = "block" ;
    			this.from.style.top = 0 + "px";
    			this.to.style.top = - (this.from.parentNode.offsetHeight )+ "px";
    			this.to.style.display = "block";
    			//Posionement horizontal
    			this.to.style.left = 0 + "px";
    			this.from.style.left = 0 + "px" ;
    		}
    		else if(this.direction == 'top'){
    			if(this.currentIndex == 0){
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.elementToSlide.length-1]; // dernier élément
    			}
    			else{
    				this.from = this.elementToSlide[this.currentIndex];
    				this.to = this.elementToSlide[this.currentIndex-1];
    			}
    			this.from.style.display = "block" ;
    			this.from.style.top = 0 + "px";
    			this.to.style.top = (this.from.parentNode.offsetHeight )+ "px";
    			this.to.style.display = "block";
    			//Posionement horizontal
    			this.to.style.left = 0 + "px";
    			this.from.style.left = 0 + "px" ;
    		}
    	};
     
    	calendar.prototype.fadePic = function (current,up){
    		this.calendar.style.display = "block";
    		this.opacite = current ;
    		this.up = up ;
     
    		if (this.opacite< 100 && this.up){
    			this.opacite+=3;
    			this.IsIE?this.calendar.filters[0].opacity=this.opacite:this.calendar.style.opacity=this.opacite/100;
    			var me = this;
    			this.timer = setTimeout(function(){me.fadePic(me.opacite,true)},25);
    		}
    		else{
    			clearTimeout(this.timer);
    			this.timer = null;
    			this.up = false;
    			calendarDestruct = true;
    			calendarElement = calendarTemp;
    		}
    	}
    	</script>

  7. #7
    Débutant
    Inscrit en
    Juin 2007
    Messages
    453
    Détails du profil
    Informations forums :
    Inscription : Juin 2007
    Messages : 453
    Points : 97
    Points
    97
    Par défaut
    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
     
     
    <style type="text/css">
    	/*###### Bouton gauche des mois ######*/ 
    	.MonthLeft{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -112px -250px;
    		position:absolute;
    		left:-2px;
    		top:0px;
    	}
    	.MonthLeftOver{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -126px -250px;
    		position:absolute;
    		left:-2px;
    		top:0px;
    	}
    	.MonthLeftClick{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -140px -250px;
    		position:absolute;
    		left:-2px;
    		top:0px;
    	}
    	/*###### Bouton droit des mois ######*/ 
    	.MonthRight{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -154px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;
    	}
    	.MonthRightOver{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -168px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;
    	}
    	.MonthRightClick{
    		width:14px;
    		height:50px;
    		background:url('images/static.png') -182px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;
    	}
     
    	/*###### Bouton haut des années ######*/ 
     
    	.YearTop{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -196px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;
    	}
    	.YearTopOver{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -210px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;		
    	}
    	.YearTopClick{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -224px -250px;
    		position:absolute;
    		right:-2px;
    		top:0px;		
    	}
    	/*###### Bouton bas des années ######*/ 
     
    	.YearBottom{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -196px -275px;
    		position:absolute;
    		right:-2px;
    		bottom:0px;		
    	}
    	.YearBottomOver{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -210px -275px;
    		position:absolute;
    		right:-2px;
    		bottom:0px;			
    	}
    	.YearBottomClick{
    		width:14px;
    		height:25px;
    		background:url('images/static.png') -224px -275px;
    		position:absolute;
    		right:-2px;
    		bottom:0px;			
    	}
    	/*###### conteneur principal ######*/ 
    	.calendar{
    		width:300px;
    		height:250px;
    		background:url('images/static.png') no-repeat;
    		position:absolute;
    		left:400px;
    		font-weight:bold;
    		font-family:Tahoma,"Lucida Grande",Verdana,Arial,Helvetica,sans-serif;
    		font-size:11px;
    		text-align:center;
    	}
     
    	.contentMonth{
    		width:130px;
    		height:50px;
    		background:url('images/static.png') -100px -300px repeat-x;
    		position:absolute;
    		left:85px;
    		top:5px;
    	}
    	.pMonth{
    		width:130px;
    		height:50px;
    		line-height:50px;
    		display:block;
    	}
    	.contentDay{
    		width:56px;
    		height:50px;
    		line-height:25px;
    		text-align:center;
    		background:url('images/static.png') 0px -250px;
    		position:absolute;
    		left:15px;
    		top:5px;
    	}
    	.contentYear{
    		width:56px;
    		height:50px;
    		background:url('images/static.png') -56px -250px;
    		position:absolute;
    		left:230px;
    		top:5px;
    	}
    	.pYear{
    		width:42px;
    		height:50px;
    		line-height:50px;
    		display:block;
    	}
    	.contentListDay{
    		width:290px;
    		height:155px;
    		overflow:hidden;
    		position:absolute;
    		left:5px;
    		top:90px;
     
    	}
    	.contentListDay ul{
    		width:100%;
    		height:100%;
    		position:absolute;
    		margin:0px;
    		padding:2px 0px 0px 1px;
    	}
    	.dayCurrent{
    		width:41px;
    		height:25px;
    		line-height:25px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    		background:url('images/static.png') -41px -352px;
    	}
    	.liOut{
    		width:41px;
    		height:25px;
    		line-height:25px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    		background:url('images/static.png') 0px -352px;
    		cursor:pointer;
    	}
    	.liHover{
    		width:41px;
    		height:25px;
    		line-height:25px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    		background:url('images/static.png') -41px -352px;
    		cursor:pointer;
    	}
    	.liInactive{
    		width:41px;
    		height:25px;
    		line-height:25px;
    		display:block;
     
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    		background:url('images/static.png') -82px -352px;
    	}
    	.contentNameDay{
    		width:290px;
    		height:27px;
    		line-height:27px;
    		overflow:hidden;
    		position:absolute;
    		left:5px;
    		top:63px;
    		padding:0px;
    		margin:0px;
    		list-style:none;
    	}
     
    	.contentNameDay li{
    		width:41px;
    		display:block;
    		float:left;
    		text-align:center;
    		color:#000000;
    		font-weight:bold;
    	}
     
    	.bugFrame{
    		position:absolute;
    		top:0px;
    		left:0px;
    		background:url('images/static.png') no-repeat;
    		z-index:0;
    		width:100%;
    		height:100%;
    		border:0px;
    	}
    </style>
     
    <style type="text/css">
    <!--
    #apDiv1 {
    	position:absolute;
    	left:636px;
    	top:15px;
    	width:0px;
    	height:9px;
    	z-index:1;
    }
    #apDiv2 {
    	position:absolute;
    	left:996px;
    	top:150px;
    	width:155px;
    	height:63px;
    	z-index:2;
    }
    #apDiv3 {
    	position:absolute;
    	left:997px;
    	top:221px;
    	width:152px;
    	height:60px;
    	z-index:3;
    }
    #apDiv4 {
    	position:absolute;
    	left:998px;
    	top:290px;
    	width:152px;
    	height:60px;
    	z-index:4;
    }
    #apDiv5 {
    	position:absolute;
    	left:999px;
    	top:360px;
    	width:152px;
    	height:55px;
    	z-index:5;
    }
    #apDiv6 {
    	position:absolute;
    	left:999px;
    	top:421px;
    	width:152px;
    	height:59px;
    	z-index:6;
    }
    #apDiv7 {
    	position:absolute;
    	left:1000px;
    	top:491px;
    	width:151px;
    	height:53px;
    	z-index:7;
    }
    #apDiv8 {
    	position:absolute;
    	left:1001px;
    	top:556px;
    	width:149px;
    	height:54px;
    	z-index:8;
    }
    #apDiv9 {
    	position:absolute;
    	left:1000px;
    	top:617px;
    	width:150px;
    	height:52px;
    	z-index:9;
    }
    #apDiv10 {
    	position:absolute;
    	left:687px;
    	top:153px;
    	width:304px;
    	height:61px;
    	z-index:10;
    }
    #apDiv11 {
    	position:absolute;
    	left:688px;
    	top:219px;
    	width:303px;
    	height:58px;
    	z-index:11;
    }
    #apDiv12 {
    	position:absolute;
    	left:472px;
    	top:152px;
    	width:134px;
    	height:62px;
    	z-index:12;
    }
    #apDiv13 {
    	position:absolute;
    	left:96px;
    	top:151px;
    	width:336px;
    	height:62px;
    	z-index:13;
    }
    #apDiv14 {
    	position:absolute;
    	left:695px;
    	top:614px;
    	width:295px;
    	height:54px;
    	z-index:14;
    }
    #apDiv15 {
    	position:absolute;
    	left:145px;
    	top:220px;
    	width:288px;
    	height:142px;
    	z-index:15;
    }
    #apDiv16 {
    	position:absolute;
    	left:695px;
    	top:489px;
    	width:296px;
    	height:54px;
    	z-index:16;
    }
    #apDiv17 {
    	position:absolute;
    	left:694px;
    	top:552px;
    	width:296px;
    	height:54px;
    	z-index:17;
    }
    #apDiv18 {
    	position:absolute;
    	left:690px;
    	top:287px;
    	width:301px;
    	height:60px;
    	z-index:18;
    }
    #apDiv19 {
    	position:absolute;
    	left:691px;
    	top:355px;
    	width:299px;
    	height:57px;
    	z-index:19;
    }
    #apDiv20 {
    	position:absolute;
    	left:694px;
    	top:421px;
    	width:297px;
    	height:59px;
    	z-index:20;
    }
    #apDiv21 {
    	position:absolute;
    	left:147px;
    	top:374px;
    	width:288px;
    	height:171px;
    	z-index:21;
    }
    #apDiv22 {
    	position:absolute;
    	left:493px;
    	top:553px;
    	width:121px;
    	height:61px;
    	z-index:22;
    }
    #apDiv23 {
    	position:absolute;
    	left:401px;
    	top:553px;
    	width:85px;
    	height:52px;
    	z-index:23;
    }
    #apDiv24 {
    	position:absolute;
    	left:35px;
    	top:563px;
    	width:153px;
    	height:51px;
    	z-index:24;
    }
    #apDiv25 {
    	position:absolute;
    	left:291px;
    	top:552px;
    	width:102px;
    	height:61px;
    	z-index:25;
    }
    #apDiv26 {	position:absolute;
    	left:498px;
    	top:96px;
    	width:448px;
    	height:60px;
    	z-index:3;
    }
    #apDiv27 {
    	position:absolute;
    	left:12px;
    	top:27px;
    	width:0px;
    	height:0px;
    	z-index:26;
    }
    #apDiv28 {
    	position:absolute;
    	left:881px;
    	top:51px;
    	width:266px;
    	height:90px;
    	z-index:27;
    }
    #apDiv29 {
    	position:absolute;
    	left:1001px;
    	top:674px;
    	width:150px;
    	height:62px;
    	z-index:28;
    }
    #apDiv30 {
    	position:absolute;
    	left:696px;
    	top:676px;
    	width:295px;
    	height:62px;
    	z-index:29;
    }
    #apDiv31 {
    	position:absolute;
    	left:999px;
    	top:743px;
    	width:153px;
    	height:55px;
    	z-index:30;
    }
    #apDiv32 {
    	position:absolute;
    	left:692px;
    	top:742px;
    	width:297px;
    	height:56px;
    	z-index:31;
    }
    #apDiv33 {
    	position:absolute;
    	left:439px;
    	top:220px;
    	width:169px;
    	height:69px;
    	z-index:32;
    }
    #apDiv34 {
    	position:absolute;
    	left:441px;
    	top:372px;
    	width:172px;
    	height:68px;
    	z-index:33;
    }
    #apDiv35 {
    	position:absolute;
    	left:496px;
    	top:632px;
    	width:119px;
    	height:54px;
    	z-index:34;
    }
    #apDiv36 {
    	position:absolute;
    	left:402px;
    	top:627px;
    	width:88px;
    	height:48px;
    	z-index:35;
    }
    #apDiv37 {
    	position:absolute;
    	left:149px;
    	top:743px;
    	width:47px;
    	height:46px;
    	z-index:36;
    }
    #apDiv38 {
    	position:absolute;
    	left:212px;
    	top:744px;
    	width:53px;
    	height:47px;
    	z-index:37;
    }
    #apDiv39 {
    	position:absolute;
    	left:147px;
    	top:555px;
    	width:136px;
    	height:51px;
    	z-index:38;
    }
    #apDiv40 {
    	position:absolute;
    	left:362px;
    	top:53px;
    	width:507px;
    	height:36px;
    	z-index:39;
    }
    .Style1 {
    	font-size: 24px;
    	font-weight: bold;
    	color: #FF0000;
    }
    #apDiv41 {
    	position:absolute;
    	left:363px;
    	top:93px;
    	width:506px;
    	height:48px;
    	z-index:40;
    }
    .Style2 {
    	font-size: 24px;
    	font-weight: bold;
    }
    .Style3 {color: #9999CC}
    .Style4 {color: #FF0000}
    -->
    </style>
    </head>
     
    <body lang="ar">
    <?php  
    require_once('Connections/connection.php');
    ?>
    <div id="apDiv1"></div>
    <div id="apDiv3" align="right">
      <label>
     
      <div align="right">
      <strong><span class="Style4">*</span>date</strong><br />
      </div>
    </label></div>
      <div id="apDiv33"><label>
     
      <div align="right">xxxx<strong></strong><br />
      </div>
      </label></div>
    <div id="apDiv34"><label>
     
      <div align="right"><strong>VVVV</strong><br />
      </div>
    </label></div>
      </div>
      </div>
    <div id="apDiv4"><label>
    <div align="right"><strong><span class="Style4">xxxxxxx</span> </strong><br />
      </div>
    </label></div>
    <div id="apDiv5"><label>
     
      <div align="right">
       <strong>*xxxxxx</strong><br />
      </div>
      </label></div>
    <div id="apDiv6"><label>
     
      <div align="right">
      <strong>*VVVVV</strong> <br />
      </div>
      </label></div>
    <div id="apDiv7"><label>
     
      <div align="right">
      <strong>*xxxxxل</strong> <br />
      </div>
      </label></div>
    <div id="apDiv11" align="right">
    <form id="form1" name="form1" method="post" action="">
        <label>
        <input dir="rtl" type="text" name="hscode"  size="30" id="hscode" onClick="var toto = new calendar(this);" />
        </label>
      </form>
    </div>
    <div id="apDiv15">
      <form id="form2" name="form2" method="post" action="">
        <label>
          <textarea name="remarques" id="remarques" cols="45" rows="5"></textarea>
        </label>
      </form>
    </div>
    <div id="apDiv16" align="right">
      <form id="form1" name="form1" method="post" action="">
        <label>
        <input dir="rtl" type="text" name="hscode"  size="30" id="hscode"  />
        </label>
      </form>
    </div>
    <div id="apDiv18" align="right">
     <select name="ma7dhar" size="1"> 
    <?php 
    $result = mysql_query($query);
        while($row = mysql_fetch_assoc($result)) 
         {
           echo "<option>".$row['ma7dhar']."</option>"; 
     
     
         }
    ?>
     
        <option selected="selected">100000</option>
        <option>200000</option>
      </select>
    </div>
    <div id="apDiv19" align="right">
      <select name="racide" size="1">
        <option selected="selected">100000</option>
        <option>200000</option>
      </select>
    </div>
    <div id="apDiv20" align="right">
      <form id="form1" name="form1" method="post" action="">
        <label>
        <input dir="rtl" type="text" name="hscode"  size="30" id="hscode"  />
        </label>
      </form>
    </div>
    <div id="apDiv21">
      <form id="form3" name="form3" method="post" action="">
        <label>
          <textarea name="remarque" id="remarque" cols="45" rows="5"></textarea>
        </label>
      </form>
    </div>
    <div id="apDiv27"></div>
    <div>
      <table width="1152" height="774" border="0">
        <tr>
          <td width="646" height="760">&nbsp;</td>
          <td width="496">&nbsp;</td>
        </tr>
      </table>
    </div>
    </body>
    </html>
    voila j'ai decomposé le code en deux partie

  8. #8
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Points : 91 220
    Points
    91 220
    Billets dans le blog
    20
    Par défaut
    Ajoute juste un z-index suffisant à la classe .calendar !
    Pas de question technique par MP !
    Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
    Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
    Mon livre sur jQuery
    Module Firefox / Chrome d'intégration de JSFiddle et CodePen sur le forum

  9. #9
    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 638
    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 638
    Points : 66 667
    Points
    66 667
    Billets dans le blog
    1
    Par défaut
    il me semble pourtant avoir insisté sur le chat que la seule possibilité était le zindex ...
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  10. #10
    Débutant
    Inscrit en
    Juin 2007
    Messages
    453
    Détails du profil
    Informations forums :
    Inscription : Juin 2007
    Messages : 453
    Points : 97
    Points
    97
    Par défaut
    Vous pouvez expliquez encore plus s'il vous plaît ,
    j'ai essayé d'augmenter la valeur de zindex dans la balise div cependant rien ne s'est changé.
    toute information sera le bien venue et merci d'vance

  11. #11
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Points : 91 220
    Points
    91 220
    Billets dans le blog
    20
    Par défaut
    j'ai essayé d'augmenter la valeur de zindex dans la balise div cependant rien ne s'est changé.
    Dans quelle balise div ?
    Etant donné que tu affectes des z-index à tes formulaires, il est nécessaire de donner des z-index supérieurs aux éléments que tu veux afficher par-dessus !
    Donc, je vois mal comment expliquer plus que :
    Ajoute juste un z-index suffisant à la classe .calendar !
    Pas de question technique par MP !
    Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
    Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
    Mon livre sur jQuery
    Module Firefox / Chrome d'intégration de JSFiddle et CodePen sur le forum

Discussions similaires

  1. Souci d'affichages 3D
    Par ToTo13 dans le forum OpenGL
    Réponses: 12
    Dernier message: 14/06/2006, 13h35
  2. [SQL] Soucis d'affichage de requête SQL
    Par kilkikou dans le forum PHP & Base de données
    Réponses: 9
    Dernier message: 06/06/2006, 16h25
  3. soucis d'affichage
    Par Tempotpo dans le forum AWT/Swing
    Réponses: 4
    Dernier message: 19/01/2006, 10h16
  4. [Swings]Quelques soucis à l'affichage !
    Par julienOriano dans le forum AWT/Swing
    Réponses: 3
    Dernier message: 23/09/2004, 13h22

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