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 :

javascript et php


Sujet :

JavaScript

  1. #41
    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 : 54
    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
    Citation Envoyé par SpaceFrog
    regarde ton html généré ...
    Surtout, montre-le nous !

  2. #42
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    le html généré me semble correct?
    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
    <script language="text/javascript">
     
     function calcul(p1,p2,p3,p4,t1,t2,t3,type,versement,acompte)
     
     {
     
    	 var t1		 	= 17.00;
     
    	 var t2 		= 10.00;
     
    	 var t3 		= 6.00;
     
    	 var p1		 	= 5000.00;
     
     	 var p2 		= 5000.01;
     
     	 var p3 		= 8000.00;
     
    	 var p4 		= 8000.01;
     
    	 var type		= "d";	
     
     	 var versement  = 34312.51; 
     
    	 var acompte	= document.getElementById("acompte").value;
     
     
     
    	 if (type== "d") ;
     
    	 	{
     
    			if(versement== 0 && acompte <= p1)
     
    			{
     
    				reste1= acompte;
     
    				pc= t1/100;
     
    				taux1= pc+1;
     
    				h1=((reste1*taux1)+reste1);
     
    				honoraires=h1;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement < p1 && (versement + acompte) <= p1)
     
    			{
     
    				reste1= acompte;
     
    				pc= t1/100;
     
    				taux1= pc+1;
     
    				h1= ((reste1*taux1)-reste1;
     
    				honoraires= h1;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement <= p1 && (versement+acompte)>= p2 && (versement+acompte)<=p3)
     
    			{
     
    				reste1=p1-versement;
     
    				pc=t1/100;
     
    				taux1=pc+1;
     
    				h1=(reste1*taux1)-reste1;
     
    				reste2=acompte-reste1;
     
    				pc2=t2/100;
     
    				taux2=pc2+1;
     
    				h2=(reste2*taux2)-reste2;
     
    				honoraires=h1+h2;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('t2').value=taux2;
     
    				document.getElementById('h2').value=h2;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if (versement==0 && acompte>=p2 && acompte <=p3)
     
    			{
     
    				reste2=acompte-p1;
     
    				reste1=p1;
     
    				pc=(t1/100);
     
    				taux1=pc+1;
     
    				h1=((reste1*taux1)-reste1);
     
    				pc2=(t2/100);
     
    				taux2=pc2+1;
     
    				h2=((reste2*taux2)-reste2);
     
    				honoraires=(h1+h2);
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('t2').value=taux2;
     
    				document.getElementById('h2').value=h2;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement<=p3 && versement>=p2 && (versement+acompte)>=p2 && (versement+acompte)<=$3)
     
    			{
     
     
     
    			reste1=acompte;
     
    			pc=($2/100);
     
    			taux1=pc+1;
     
    			h1=((reste1*taux1)-reste1);
     
    			honoraires=h1;	
     
    			document.getElementById('t1').value=taux1;
     
    			document.getElementById('h1').value=h1;
     
    			document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement>=p2 && versement<=p3 && (versement+acompte)>=p4)
     
    		{
     
    			reste1=p4-versement;
     
    			pc=(t2/100);
     
    			taux2=pc+1;
     
    			h2=((reste1*taux2)-reste1);
     
    			reste2=acompte-reste1;
     
    			pc2=(t3/100);
     
    			taux3=pc2+1;
     
    			h3=((reste2*taux3)-reste2);
     
    			honoraires=(h2+h3);
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('t2').value=taux2;
     
    			document.getElementById('h2').value=h2;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    		else if(versement==0 && acompte>=p4)
     
    		{
     
    			reste1=p1;
     
    			reste2=p3-p2;
     
    			pc=(t1/100);
     
    			taux1=pc+1;
     
    			h1=((reste1*taux1)-reste1);
     
    			pc2=(t2/100);
     
    			taux2=pc2+1;
     
    			h2=((reste2*taux2)-reste2);
     
    			reste3=(acompte-reste1-reste2);
     
    			pc3=(t3/100);
     
    			taux3=pc3+1;
     
    			h3=((reste3*$taux3)-reste3);
     
    			honoraires=(h1+h2+h3);
     
    			document.getElementById('t1').value=taux1;
     
    			document.getElementById('h1').value=h1;
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('t2').value=taux2;
     
    			document.getElementById('h2').value=h2;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    	else if(versement>=p4)
     
    		{
     
    			reste3=acompte;
     
    			pc3=($3/100);
     
    			taux3=pc3+1;
     
    			h3=((reste3*taux3)-reste3);
     
    			honoraires=(h3);
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    		}
     
    	if (type=="l")
     
    	{
     
    	pc1=(t1/100);
     
    	taux1=pc1+1;
     
    	honoraires=acompte*taux1;
     
    	document.getElementById('t1').value=taux1;
     
    	document.getElementById('h1').value=h1;
     
    	document.getElementById('honoraires').value=honoraires;
     
    	}
     
     }
     
     
     
     </script>
    j'ai renommé le champs texte avec le onkeyup par calcul a la place de calculhonoraires.

  3. #43
    Rédacteur/Modérateur

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

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

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 640
    Points : 66 663
    Points
    66 663
    Billets dans le blog
    1
    Par défaut
    là y'a que le js ...
    si on ne le voit pas dans le contexte général de la page ...

  4. #44
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    ah pardon
    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
    <body>
     
     
     
     
     
       <script language="text/javascript">
     
     function calcul(p1,p2,p3,p4,t1,t2,t3,type,versement,acompte)
     
     {
     
    	 var t1		 	= 17.00;
     
    	 var t2 		= 10.00;
     
    	 var t3 		= 6.00;
     
    	 var p1		 	= 5000.00;
     
     	 var p2 		= 5000.01;
     
     	 var p3 		= 8000.00;
     
    	 var p4 		= 8000.01;
     
    	 var type		= "d";	
     
     	 var versement  = 34312.51; 
     
    	 var acompte	= document.getElementById("acompte").value;
     
     
     
    	 if (type== "d") ;
     
    	 	{
     
    			if(versement== 0 && acompte <= p1)
     
    			{
     
    				reste1= acompte;
     
    				pc= t1/100;
     
    				taux1= pc+1;
     
    				h1=((reste1*taux1)+reste1);
     
    				honoraires=h1;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement < p1 && (versement + acompte) <= p1)
     
    			{
     
    				reste1= acompte;
     
    				pc= t1/100;
     
    				taux1= pc+1;
     
    				h1= ((reste1*taux1)-reste1;
     
    				honoraires= h1;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement <= p1 && (versement+acompte)>= p2 && (versement+acompte)<=p3)
     
    			{
     
    				reste1=p1-versement;
     
    				pc=t1/100;
     
    				taux1=pc+1;
     
    				h1=(reste1*taux1)-reste1;
     
    				reste2=acompte-reste1;
     
    				pc2=t2/100;
     
    				taux2=pc2+1;
     
    				h2=(reste2*taux2)-reste2;
     
    				honoraires=h1+h2;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('t2').value=taux2;
     
    				document.getElementById('h2').value=h2;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if (versement==0 && acompte>=p2 && acompte <=p3)
     
    			{
     
    				reste2=acompte-p1;
     
    				reste1=p1;
     
    				pc=(t1/100);
     
    				taux1=pc+1;
     
    				h1=((reste1*taux1)-reste1);
     
    				pc2=(t2/100);
     
    				taux2=pc2+1;
     
    				h2=((reste2*taux2)-reste2);
     
    				honoraires=(h1+h2);
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('t2').value=taux2;
     
    				document.getElementById('h2').value=h2;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement<=p3 && versement>=p2 && (versement+acompte)>=p2 && (versement+acompte)<=$3)
     
    			{
     
     
     
    			reste1=acompte;
     
    			pc=($2/100);
     
    			taux1=pc+1;
     
    			h1=((reste1*taux1)-reste1);
     
    			honoraires=h1;	
     
    			document.getElementById('t1').value=taux1;
     
    			document.getElementById('h1').value=h1;
     
    			document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement>=p2 && versement<=p3 && (versement+acompte)>=p4)
     
    		{
     
    			reste1=p4-versement;
     
    			pc=(t2/100);
     
    			taux2=pc+1;
     
    			h2=((reste1*taux2)-reste1);
     
    			reste2=acompte-reste1;
     
    			pc2=(t3/100);
     
    			taux3=pc2+1;
     
    			h3=((reste2*taux3)-reste2);
     
    			honoraires=(h2+h3);
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('t2').value=taux2;
     
    			document.getElementById('h2').value=h2;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    		else if(versement==0 && acompte>=p4)
     
    		{
     
    			reste1=p1;
     
    			reste2=p3-p2;
     
    			pc=(t1/100);
     
    			taux1=pc+1;
     
    			h1=((reste1*taux1)-reste1);
     
    			pc2=(t2/100);
     
    			taux2=pc2+1;
     
    			h2=((reste2*taux2)-reste2);
     
    			reste3=(acompte-reste1-reste2);
     
    			pc3=(t3/100);
     
    			taux3=pc3+1;
     
    			h3=((reste3*$taux3)-reste3);
     
    			honoraires=(h1+h2+h3);
     
    			document.getElementById('t1').value=taux1;
     
    			document.getElementById('h1').value=h1;
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('t2').value=taux2;
     
    			document.getElementById('h2').value=h2;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    	else if(versement>=p4)
     
    		{
     
    			reste3=acompte;
     
    			pc3=($3/100);
     
    			taux3=pc3+1;
     
    			h3=((reste3*taux3)-reste3);
     
    			honoraires=(h3);
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    		}
     
    	if (type=="l")
     
    	{
     
    	pc1=(t1/100);
     
    	taux1=pc1+1;
     
    	honoraires=acompte*taux1;
     
    	document.getElementById('t1').value=taux1;
     
    	document.getElementById('h1').value=h1;
     
    	document.getElementById('honoraires').value=honoraires;
     
    	}
     
     }
     
     
     
     </script>
     
     
     
     
     
     
     
     
     
    </p>
     
    <br /><br />
     
     
     
     <form action="#" method="post" name="n_doss">
     
    <fieldset  style="background:#FFF" ><legend><strong>Dossier</strong>:</legend><table class="noborder"><tr><td width="32"><img src="images/Folder.png" /></td><td width="117" style="vertical-align:middle"><input name="n_doss" type="text" placeholder="120015666223"  size="15" maxlength="13" /></td><td width="28"><input type="image" src="images/search_button_green.png" name="n_doss" width="32" height="32" onclick="n_doss.submit" /></td></tr></table></fieldset></form>
     
     
     
     
     
    <form action="#" method="post"><fieldset  style="background:#FFF" ><legend><strong>Versement</strong>:</legend><strong>Dossier:</strong> 120015660012  - <strong>Affaire:</strong> S.A.S. PROGERIS<strong> c/</strong>  M. PIOTROWSKI STANISLAS   
     
     
     
      <table width="100%" class="contacts">
     
      <tr>
     
        <td width="38" class="contactDept"><p align="center"><strong>DATE</strong></p></td><td width="215" class="contactDept"><p align="center"><strong>MODE</strong></p></td><td width="232" class="contactDept"><p align="center"><strong>MONTANT</strong></p></td><td width="257" class="contactDept"><p align="center"><strong>PAIEMENT</strong></p></td></tr>
     
          <tr>
     
            <td align="center"><p align="center"><input name="date_reception" type="text" id="date_reception" value="" size="5"  /></p></td><td align="center"><p align="center"><select name="mode"><option value="CHEQUE DEBITEUR">CHEQUE DEBITEUR</option><option value="CHEQUE CARPA">CHEQUE CARPA</option><option value="VIREMENT">VIREMENT</option><option value="MANDAT CASH">MANDAT CASH</option><option value="MANDAT COMPTE">MANDAT COMPTE</option><option value="MANDAT ADMINISTRATIF">MANDAT ADMINISTRATIF</option><option value="CB A AGENT">CARTE BLEUE AVEC UN AGENT</option><option value="CB SUR SITE">CARTE BLEUE SUR LE SITE</option> </select></p></td><td><p align="center"><input type="text" name="acompte" id="acompte" value="" onkeyup="calcul()"  /> 
     
            &euro;</p></td><td width="257" align="center"><p align="center"><input type="checkbox" name="pd" value="pd" /> Paiement Direct? </p></td>
     
     
     
          </tr>
     
     
     
     
     
    </table>  
     
      <p><label for="gestionnaire">Gestionnaire:</label><select name='gestionnaire'><option value='2'>Rabit Roger</option></select></p>
     
      <p>
     
      <label for="gestionnaire">Charg&eacute; d'affaire:</label><select name='gestionnaire'><option value='1'>Piotrowski Stanislas</option></select>  </p>
     
      <p> <table width="100%" class="contacts">
     
      <tr>
     
        <td class="contactDept"><p align="center"><strong>Palier  1</strong></p></td><td class="contactDept"><p align="center"><strong>Palier 2</strong></p></td><td class="contactDept"><p align="center"><strong>Palier 3 </strong></p></td>
     
        <td class="contactDept"><p align="center"><strong>Taux 1</strong></p></td>
     
        <td class="contactDept"><p align="center"><strong>Taux 2</strong></p></td>
     
        <td class="contactDept"><p align="center"><strong>Taux 3</strong></p></td>
     
        <td class="contactDept"><p align="center"><strong>&sum; Honoraires</strong></p></td></tr>
     
     
     
          <tr>
     
            <td align="center"><p align="center"><input name="p1" id="p1" type="text" size="8" readonly="readonly" value="" /> &euro;</p></td><td align="center"><p align="center">
     
              <input name="p2" id="p2" type="text" size="8" readonly="readonly" />
     
    &euro;</p></td><td><p align="center">
     
      <input name="p3" id="p2" type="text" size="8" readonly="readonly" />
     
    &euro;</p></td>
     
            <td  align="center"><p align="center"> <input name="t1" id="t1" type="text" size="8" readonly="readonly" /> %</p></td>
     
            <td  align="center"><p align="center"> <input name="t2" id="t2" type="text" size="8" readonly="readonly" /> %</p></td>
     
            <td  align="center"><p align="center"> <input name="t3" id="3" type="text" size="8" readonly="readonly" /> %</p></td>
     
            <td  align="center"><p align="center"> <input name="honoraires" id="honoraires" type="text" size="8" readonly="readonly" /> &euro;</p></td>
     
     
     
          </tr>
     
     
     
     
     
    </table>  </p>
     
      <p></p>
     
      <p>
     
        <input type="image" src="images/3floppy_unmount.png"  value="Valider !" name="go"/>
     
      </p>
     
      <p>&nbsp;</p>
     
      <p>&nbsp;</p>
     
      <p>&nbsp;</p>
     
      </fieldset>
     
    </form>
     
    </body>
     
    </html></p> <p></p>
     
                                                         <p></p><p><iframe frameborder="0" scrolling="auto" height="400" width="100%" allowtransparency="false" marginwidth="0" marginheight="0" src="http://ecal.forexpros.fr/e_cal.php?duration=daily&top_text_color=FFFFFF&header_text_color=FFFFFF&bg1=FFFFFF&bg2=CEEBFF&border=CBCBCB" align="center" style="background:#FFF"></iframe><br />
     
                                                         </p><p></p>
     
                                                         <div align="center"><br /><div style="width:564px"><img src="http://c1802182.cdn.cloudfiles.rackspacecloud.com/forexpros_fr_logo.png" alt="ForexPros" title="ForexPros" style="float:left; display:none" /><span style="float:right; display:none"><span style="font-size: 11px;color: #333333;text-decoration: none;">Graphiques<a href="http://www.forexpros.fr/" target="_blank" style="font-size: 11px;color: #06529D; font-weight: bold;" class="underline_link"> Forex</a> fournis par Forexpros.fr - Le portail web de trading Forex.</span></span></div></div>
     
    													  <p>&nbsp;</p>
     
    												  </div>
     
    													<div class="cleared"></div>
     
    												</div>
     
    												<div class="cleared"></div>
     
    											</div>
     
    										</div>
     
    										<div class="cleared"></div>
     
    									</div>
     
    								</div>
     
    							</div>
     
    							<div class="cleared"></div>
     
    							<div class="art-footer">
     
    								<div class="art-footer-t"></div>
     
    								<div class="art-footer-l"></div>
     
    								<div class="art-footer-b"></div>
     
    								<div class="art-footer-r"></div>
     
    								<div class="art-footer-body"><a href="./#" class="art-rss-tag-icon" title="RSS"></a>
     
    									<div class="art-footer-text">
     
    										<p>&nbsp;</p>
     
    										<p>Copyright &copy; 2012. All Rights Reserved.</p>
     
    									</div>
     
    									<div class="cleared"></div>
     
    								</div>
     
    							</div>
     
    							<div class="cleared"></div>
     
    						</div>
     
    					</div>
     
    					<div class="cleared"></div>
     
    					<p class="art-page-footer"></p>
     
    				</div>
     
    			</div>
     
    		</div>
     
    	</body>

  5. #45
    Rédacteur/Modérateur

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

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

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 640
    Points : 66 663
    Points
    66 663
    Billets dans le blog
    1
    Par défaut
    8o

    c'est quoi cette structure de page avec une fermeture de balise html au milieu de la page ?????????????????

  6. #46
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    non en fait c'est a cause de l'include, car cette page est incluse dansd une autre en php. e,n fait sur l'indes.php j'ai l'header le footer et le menu et dans le cadre j'ai les autres.

    est-ce a cause de ca que ca ne fonctionne pas?

  7. #47
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    bon j'ai cleané le code et mis les bonnes balises ouvrantesz et fermantes au bon endroit, néanmoins j'ai toujours le même problème...

    je ne sais plus comment procéder.

  8. #48
    Rédacteur/Modérateur

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

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

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 640
    Points : 66 663
    Points
    66 663
    Billets dans le blog
    1
    Par défaut
    en nous remontrant ton code clean ...

  9. #49
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    le voici:

    Code html : 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
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
     
    <head>
     
     
     
     
     
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
     
    		<!--
     
        Created by Artisteer v3.0.0.35414
     
        Base template (without user's data) checked by http://validator.w3.org : "This page is valid XHTML 1.0 Transitional"
     
        -->
     
    		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     
    		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
     
    		<title>New Page</title>
     
    		<link rel="stylesheet" href="./style.css" type="text/css" media="screen" />
     
    		<!--[if IE 6]><link rel="stylesheet" href="./style.ie6.css" type="text/css" media="screen" /><![endif]-->
     
    		<!--[if IE 7]><link rel="stylesheet" href="./style.ie7.css" type="text/css" media="screen" /><![endif]-->
     
    		<script type="text/javascript" src="./jquery.js"></script>
     
    		<script type="text/javascript" src="./script.js"></script>
     
            <script language="JavaScript">
     
    <!--
     
    function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
     
    {
     
      toolbar_str = toolbar ? 'yes' : 'no';
     
      menubar_str = menubar ? 'yes' : 'no';
     
      statusbar_str = statusbar ? 'yes' : 'no';
     
      scrollbar_str = scrollbar ? 'yes' : 'no';
     
      resizable_str = resizable ? 'yes' : 'no';
     
     
     
      cookie_str = document.cookie;
     
      cookie_str.toString();
     
     
     
      pos_start  = cookie_str.indexOf(name);
     
      pos_end    = cookie_str.indexOf('=', pos_start);
     
     
     
      cookie_name = cookie_str.substring(pos_start, pos_end);
     
     
     
      pos_start  = cookie_str.indexOf(name);
     
      pos_start  = cookie_str.indexOf('=', pos_start);
     
      pos_end    = cookie_str.indexOf(';', pos_start);
     
     
     
      if (pos_end <= 0) pos_end = cookie_str.length;
     
      cookie_val = cookie_str.substring(pos_start + 1, pos_end);
     
      if (cookie_name == name && cookie_val  == "done")
     
        return;
     
      var left_adj, top_adj;
     
      left_adj = left;
     
      top_adj = top;  
     
      if (left_adj == 0) {
     
        left_adj = (screen.width / 2) - (width / 2);
     
      }
     
      if (top_adj == 0) {
     
        top_adj = (screen.height / 2)-(height / 2);
     
      }
     
      window.open(url, name, 'left='+left_adj+',top='+top_adj+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
     
     
     
    //  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
     
    }
     
     
     
    // -->
     
    </script>
     
            <title>. : : DEPARTEMENT DE COMPTABILITE : : .</title>
     
     
     
    	</head>
     
    	<body>
     
    		<table  border="0" cellspacing="0" cellpadding="0" align="center">
     
      <tr>
     
        <td >
     
            <iframe frameborder="0" scrolling="no" height="190" width="540" allowtransparency="true" marginwidth="0" marginheight="0" src="http://fxrates.forexpros.fr/index_exchange.php?params&amp;inner-border-color=%23CBCBCB&amp;border-color=%23cbcbcb&amp;bg1=%23F6F6F6&amp;bg2=%23ffffff&amp;inner-text-color=%23000000&amp;currency-name-color=%23000000&amp;header-text-color=%23FFFFFF" align="right"></iframe>
     
     
     
     
     
        </td>
     
        <td ><img src="images/accounting3.jpg" alt="compta" width="187" height="190" /></td>
     
        <td  ><iframe frameborder="0" scrolling="no" height="190" width="515" allowtransparency="true" marginwidth="0" marginheight="0" src="http://fxrates.forexpros.fr/index.php?pairs_ids=1;3;2;4;7;5;8;6;&amp;header-text-color=%23FFFFFF&amp;curr-name-color=%230059b0&amp;inner-text-color=%23000000&amp;green-text-color=%232A8215&amp;green-background=%23B7F4C2&amp;red-text-color=%23DC0001&amp;red-background=%23FFE2E2&amp;inner-border-color=%23CBCBCB&amp;border-color=%23cbcbcb&amp;bg1=%23F6F6F6&amp;bg2=%23ffffff&amp;bid=show&amp;ask=show&amp;last=hide&amp;change=hide&amp;last_update=show"></iframe></td>
     
      </tr>
     
     <tr>
     
       <td align="center" colspan="3">&nbsp;</td></tr>
     
    </table><div id="art-page-background-glare">
     
    			<div id="art-page-background-glare-image">
     
    				<div id="art-main">
     
    					<div class="art-sheet">
     
    						<div class="art-sheet-tl"></div>
     
    						<div class="art-sheet-tr"></div>
     
    						<div class="art-sheet-bl"></div>
     
    						<div class="art-sheet-br"></div>
     
    						<div class="art-sheet-tc"></div>
     
    						<div class="art-sheet-bc"></div>
     
    						<div class="art-sheet-cl"></div>
     
    						<div class="art-sheet-cr"></div>
     
    						<div class="art-sheet-cc"></div>
     
    						<div class="art-sheet-body">
     
    							<div class="art-content-layout">
     
    								<div class="art-content-layout-row">
     
    									<div class="art-layout-cell art-content">
     
    										<div class="art-post">
     
    											<div class="art-post-body">
     
    												<div class="art-post-inner art-article" >
     
    													<p align="center"><a href="index.php"><img src="images/titre_sptwrodubpue564.png" alt=""  /></a></p>
     
    													<div class="art-postcontent">
     
    													  <table width="100%" style="border:none" cellspacing="0" cellpadding="0" class="noborder">
     
    													    <tr>
     
    													      <td><a href="index.php?p=gestion-comptes-journaux"><img src="images/comptab.png" width="128" height="128" /></a></td>
     
    													      <td><a href="index.php"><img src="images/credit-cards.png" width="128" height="128" /></a></td>
     
    													      <td><a href="index.php?p=saisie-debours"><img src="images/invoice.png" width="128" height="128" /></a></td>
     
    													      <td><img src="images/document.png" width="128" height="128" /></td>
     
    													      <td><img src="images/Application.png" width="128" height="128" /></td>
     
    													      <td><a href="index.php?p=mode-paiement"><img src="images/credit_cards.png" width="128" height="128" /></a></td>
     
    												        </tr>
     
    													    <tr>
     
    													      <td><a href="index.php?p=gestion-comptes-journaux">GESTION<br />
     
    												          COMPTES JOURNAUX</a></td>
     
    													      <td><a href="index.php">VERSEMENTS</a></td>
     
    													      <td><a href="index.php?p=saisie-debours">SAISIE DES <br />
     
    												          DEBOURS</a></td>
     
    													      <td>												          &Eacute;DITION<br />
     
    												          FACTURES</td>
     
    													      <td>GESTION <br />
     
    												          ABONNEMENTS</td>
     
    													      <td><a href="index.php?p=mode-paiement">GESTION MODES<br />
     
    												          PAIEMENT</a></td>
     
    												        </tr>
     
    												      </table>
     
     
     
       <script language="text/javascript">
     
     function honoraire(p1,p2,p3,p4,t1,t2,t3,type,versement,acompte)
     
     {
     
    	 var t1		 	= 17.00;
     
    	 var t2 		= 10.00;
     
    	 var t3 		= 6.00;
     
    	 var p1		 	= 5000.00;
     
     	 var p2 		= 5000.01;
     
     	 var p3 		= 8000.00;
     
    	 var p4 		= 8000.01;
     
    	 var type		= "d";	
     
     	 var versement  = 34312.51; 
     
    	 var acompte	= document.getElementById("acompte").value;
     
     
     
    	 if (type== "d") ;
     
    	 	{
     
    			if(versement== 0 && acompte <= p1)
     
    			{
     
    				reste1= acompte;
     
    				pc= t1/100;
     
    				taux1= pc+1;
     
    				h1=((reste1*taux1)+reste1);
     
    				honoraires=h1;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement < p1 && (versement + acompte) <= p1)
     
    			{
     
    				reste1= acompte;
     
    				pc= t1/100;
     
    				taux1= pc+1;
     
    				h1= ((reste1*taux1)-reste1;
     
    				honoraires= h1;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement <= p1 && (versement+acompte)>= p2 && (versement+acompte)<=p3)
     
    			{
     
    				reste1=p1-versement;
     
    				pc=t1/100;
     
    				taux1=pc+1;
     
    				h1=(reste1*taux1)-reste1;
     
    				reste2=acompte-reste1;
     
    				pc2=t2/100;
     
    				taux2=pc2+1;
     
    				h2=(reste2*taux2)-reste2;
     
    				honoraires=h1+h2;
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('t2').value=taux2;
     
    				document.getElementById('h2').value=h2;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if (versement==0 && acompte>=p2 && acompte <=p3)
     
    			{
     
    				reste2=acompte-p1;
     
    				reste1=p1;
     
    				pc=(t1/100);
     
    				taux1=pc+1;
     
    				h1=((reste1*taux1)-reste1);
     
    				pc2=(t2/100);
     
    				taux2=pc2+1;
     
    				h2=((reste2*taux2)-reste2);
     
    				honoraires=(h1+h2);
     
    				document.getElementById('t1').value=taux1;
     
    				document.getElementById('h1').value=h1;
     
    				document.getElementById('t2').value=taux2;
     
    				document.getElementById('h2').value=h2;
     
    				document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement<=p3 && versement>=p2 && (versement+acompte)>=p2 && (versement+acompte)<=$3)
     
    			{
     
     
     
    			reste1=acompte;
     
    			pc=($2/100);
     
    			taux1=pc+1;
     
    			h1=((reste1*taux1)-reste1);
     
    			honoraires=h1;	
     
    			document.getElementById('t1').value=taux1;
     
    			document.getElementById('h1').value=h1;
     
    			document.getElementById('honoraires').value=honoraires;
     
    			}
     
    			else if(versement>=p2 && versement<=p3 && (versement+acompte)>=p4)
     
    		{
     
    			reste1=p4-versement;
     
    			pc=(t2/100);
     
    			taux2=pc+1;
     
    			h2=((reste1*taux2)-reste1);
     
    			reste2=acompte-reste1;
     
    			pc2=(t3/100);
     
    			taux3=pc2+1;
     
    			h3=((reste2*taux3)-reste2);
     
    			honoraires=(h2+h3);
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('t2').value=taux2;
     
    			document.getElementById('h2').value=h2;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    		else if(versement==0 && acompte>=p4)
     
    		{
     
    			reste1=p1;
     
    			reste2=p3-p2;
     
    			pc=(t1/100);
     
    			taux1=pc+1;
     
    			h1=((reste1*taux1)-reste1);
     
    			pc2=(t2/100);
     
    			taux2=pc2+1;
     
    			h2=((reste2*taux2)-reste2);
     
    			reste3=(acompte-reste1-reste2);
     
    			pc3=(t3/100);
     
    			taux3=pc3+1;
     
    			h3=((reste3*$taux3)-reste3);
     
    			honoraires=(h1+h2+h3);
     
    			document.getElementById('t1').value=taux1;
     
    			document.getElementById('h1').value=h1;
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('t2').value=taux2;
     
    			document.getElementById('h2').value=h2;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    	else if(versement>=p4)
     
    		{
     
    			reste3=acompte;
     
    			pc3=($3/100);
     
    			taux3=pc3+1;
     
    			h3=((reste3*taux3)-reste3);
     
    			honoraires=(h3);
     
    			document.getElementById('t3').value=taux3;
     
    			document.getElementById('h3').value=h3;
     
    			document.getElementById('honoraires').value=honoraires;
     
    		}
     
    		}
     
    	if (type=="l")
     
    	{
     
    	pc1=(t1/100);
     
    	taux1=pc1+1;
     
    	honoraires=acompte*taux1;
     
    	document.getElementById('t1').value=taux1;
     
    	document.getElementById('h1').value=h1;
     
    	document.getElementById('honoraires').value=honoraires;
     
    	}
     
     }
     
     
     
     </script>
     
     
     
     
     
     
     
     
     
    </p>
     
    <br /><br />
     
     
     
     <form action="#" method="post" name="n_doss">
     
    <fieldset  style="background:#FFF" ><legend><strong>Dossier</strong>:</legend><table class="noborder"><tr><td width="32"><img src="images/Folder.png" /></td><td width="117" style="vertical-align:middle"><input name="n_doss" type="text" placeholder="120015666223"  size="15" maxlength="13" /></td><td width="28"><input type="image" src="images/search_button_green.png" name="n_doss" width="32" height="32" onclick="n_doss.submit" /></td></tr></table></fieldset></form>
     
     
     
     
     
    <form action="#" method="post"><fieldset  style="background:#FFF" ><legend><strong>Versement</strong>:</legend><strong>Dossier:</strong> 120015660012  - <strong>Affaire:</strong> S.A.S. PROGERIS<strong> c/</strong>  M. PIOTROWSKI STANISLAS   
     
     
     
      <table width="100%" class="contacts">
     
      <tr>
     
        <td width="38" class="contactDept"><p align="center"><strong>DATE</strong></p></td><td width="215" class="contactDept"><p align="center"><strong>MODE</strong></p></td><td width="232" class="contactDept"><p align="center"><strong>MONTANT</strong></p></td><td width="257" class="contactDept"><p align="center"><strong>PAIEMENT</strong></p></td></tr>
     
          <tr>
     
            <td align="center"><p align="center"><input name="date_reception" type="text" id="date_reception" value="" size="5"  /></p></td><td align="center"><p align="center"><select name="mode"><option value="CHEQUE DEBITEUR">CHEQUE DEBITEUR</option><option value="CHEQUE CARPA">CHEQUE CARPA</option><option value="VIREMENT">VIREMENT</option><option value="MANDAT CASH">MANDAT CASH</option><option value="MANDAT COMPTE">MANDAT COMPTE</option><option value="MANDAT ADMINISTRATIF">MANDAT ADMINISTRATIF</option><option value="CB A AGENT">CARTE BLEUE AVEC UN AGENT</option><option value="CB SUR SITE">CARTE BLEUE SUR LE SITE</option> </select></p></td><td><p align="center"><input type="text" name="acompte" id="acompte" onchange="honoraire()"  /> 
     
            &euro;</p></td><td width="257" align="center"><p align="center"><input type="checkbox" name="pd" value="pd" /> Paiement Direct? </p></td>
     
     
     
          </tr>
     
     
     
     
     
    </table>  
     
      <p><label for="gestionnaire">Gestionnaire:</label><select name='gestionnaire'><option value='2'>Rabit Roger</option></select></p>
     
      <p>
     
      <label for="gestionnaire">Charg&eacute; d'affaire:</label><select name='gestionnaire'><option value='1'>Piotrowski Stanislas</option></select>  </p>
     
      <p> <table width="100%" class="contacts">
     
      <tr>
     
        <td class="contactDept"><p align="center"><strong>Palier  1</strong></p></td><td class="contactDept"><p align="center"><strong>Palier 2</strong></p></td><td class="contactDept"><p align="center"><strong>Palier 3 </strong></p></td>
     
        <td class="contactDept"><p align="center"><strong>Taux 1</strong></p></td>
     
        <td class="contactDept"><p align="center"><strong>Taux 2</strong></p></td>
     
        <td class="contactDept"><p align="center"><strong>Taux 3</strong></p></td>
     
        <td class="contactDept"><p align="center"><strong>&sum; Honoraires</strong></p></td></tr>
     
     
     
          <tr>
     
            <td align="center"><p align="center"><input name="p1" id="p1" type="text" size="8" readonly="readonly" value="" /> &euro;</p></td><td align="center"><p align="center">
     
              <input name="p2" id="p2" type="text" size="8" readonly="readonly" />
     
    &euro;</p></td><td><p align="center">
     
      <input name="p3" id="p2" type="text" size="8" readonly="readonly" />
     
    &euro;</p></td>
     
            <td  align="center"><p align="center"> <input name="t1" id="t1" type="text" size="8" readonly="readonly" /> %</p></td>
     
            <td  align="center"><p align="center"> <input name="t2" id="t2" type="text" size="8" readonly="readonly" /> %</p></td>
     
            <td  align="center"><p align="center"> <input name="t3" id="3" type="text" size="8" readonly="readonly" /> %</p></td>
     
            <td  align="center"><p align="center"> <input name="honoraires" id="honoraires" type="text" size="8" readonly="readonly" /> &euro;</p></td>
     
     
     
          </tr>
     
     
     
     
     
    </table>  </p>
     
      <p></p>
     
      <p>
     
        <input type="image" src="images/3floppy_unmount.png"  value="Valider !" name="go"/>
     
      </p>
     
      <p>&nbsp;</p>
     
      <p>&nbsp;</p>
     
      <p>&nbsp;</p>
     
      </fieldset>
     
    </form>
    <p><iframe frameborder="0" scrolling="auto" height="400" width="100%" allowtransparency="false" marginwidth="0" marginheight="0" src="http://ecal.forexpros.fr/e_cal.php?duration=daily&top_text_color=FFFFFF&header_text_color=FFFFFF&bg1=FFFFFF&bg2=CEEBFF&border=CBCBCB" align="center" style="background:#FFF"></iframe><br />
     
                                                         </p><p></p>
     
                                                         <div align="center"><br /><div style="width:564px"><img src="http://c1802182.cdn.cloudfiles.rackspacecloud.com/forexpros_fr_logo.png" alt="ForexPros" title="ForexPros" style="float:left; display:none" /><span style="float:right; display:none"><span style="font-size: 11px;color: #333333;text-decoration: none;">Graphiques<a href="http://www.forexpros.fr/" target="_blank" style="font-size: 11px;color: #06529D; font-weight: bold;" class="underline_link"> Forex</a> fournis par Forexpros.fr - Le portail web de trading Forex.</span></span></div></div>
     
    													  <p>&nbsp;</p>
     
    												  </div>
     
    													<div class="cleared"></div>
     
    												</div>
     
    												<div class="cleared"></div>
     
    											</div>
     
    										</div>
     
    										<div class="cleared"></div>
     
    									</div>
     
    								</div>
     
    							</div>
     
    							<div class="cleared"></div>
     
    							<div class="art-footer">
     
    								<div class="art-footer-t"></div>
     
    								<div class="art-footer-l"></div>
     
    								<div class="art-footer-b"></div>
     
    								<div class="art-footer-r"></div>
     
    								<div class="art-footer-body"><a href="./#" class="art-rss-tag-icon" title="RSS"></a>
     
    									<div class="art-footer-text">
     
    										<p>&nbsp;</p>
     
    										<p>Copyright &copy; 2012. All Rights Reserved.</p>
     
    									</div>
     
    									<div class="cleared"></div>
     
    								</div>
     
    							</div>
     
    							<div class="cleared"></div>
     
    						</div>
     
    					</div>
     
    					<div class="cleared"></div>
     
    					<p class="art-page-footer"></p>
     
    				</div>
     
    			</div>
     
    		</div>
     
    	</body>
     
    </html>

  10. #50
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    j'ai rechangé un petit peu le tout, mais maintenant je ne comprends pas il me dit que la variable p4 est indéfinie, or dans la source en mode affichage HTML j'ai bien p4 = 8000.01;

    comment cela se fait il?

    par avance merci.

  11. #51
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    EDIT:


    bon en fait il me disait que toutes mes variables sont indéfinies, j'ai donc du créer des champs de type hidden et leur affecter la valeur de ma variable maintenant il me dit
    Uncaught TypeError: object is not a function test.php:10
    onkeyup

  12. #52
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Points : 15 059
    Points
    15 059
    Par défaut
    Bonjour,
    Attention
    if (type== "d") ;

    {
    tu as un ";" qui traîne là.

    A+.

  13. #53
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    bonjour merci pour la réponse rapide, j'ai donc bien enlevé le point virgule.

    a priori les noms de variables portaient a confusion, j'ai donc tout modifié:

    j'ai donc ces input avec les variables:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    <input type="hidden" id="p1" value="5000.00">
     <input type="hidden" id="p2" value="5000.01">
     <input type="hidden" id="p3" value="8000.00">
     <input type="hidden" id="p4" value="8000.01">
     <input type="hidden" id="t1" value="15.0">
     <input type="hidden" id="t2" value="12.0">
     <input type="hidden" id="t3" value="6.0">
     <input type="hidden" id="versement" value="12554.35">
     <input type="hidden" id="type" value="d">


    et puis la 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
    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
       <script language="text/javascript">
     function hono(p1,p2,p3,p4,t1,t2,t3,type,versement,montantacompte)
     {
    	 var p1		 		= document.getElementById("p1").value;
     	 var p2		 		= document.getElementById("p2").value;
     	 var p3 			= document.getElementById("p3").value;
    	 var p4 			= document.getElementById("p4").value;
    	 var t1			 	= document.getElementById("t1").value;
    	 var t2 			= document.getElementById("t2").value;
    	 var t3 			= document.getElementById("t3").value;
    	 var type			= 'document.getElementById("type").value;';	
     	 var versement  	= document.getElementById("versement").value;
    	 var montantacompte	= document.getElementById("montantacompte").value;
     
    	 if (type== "d")
    	 	{
    			if(versement== 0 && montantacompte <= p1)
    			{
    				reste1= montantacompte;
    				pc= t1/100;
    				taux1= pc+1;
    				h1=((reste1*taux1)+reste1);
    				honoraires=h1;
    				document.getElementById('taux-1').value=taux1;
    				document.getElementById('palier1').value=h1;
    				document.getElementById('sommehonoraires').value=honoraires;
    			}
    			else if(versement < p1 && (versement + acompte) <= p1)
    			{
    				reste1= montantacompte;
    				pc= t1/100;
    				taux1= pc+1;
    				h1= (reste1*taux1)-reste1;
    				honoraires= h1;
    				document.getElementById('taux-1').value=taux1;
    				document.getElementById('palier1').value=h1;
    				document.getElementById('sommehonoraires').value=honoraires;
    			}
    			else if(versement <= p1 && (versement+montantacompte)>= p2 && (versement+montantacompte)<=p3)
    			{
    				reste1=p1-versement;
    				pc=t1/100;
    				taux1=pc+1;
    				h1=(reste1*taux1)-reste1;
    				reste2=montantacompte-reste1;
    				pc2=t2/100;
    				taux2=pc2+1;
    				h2=(reste2*taux2)-reste2;
    				honoraires=h1+h2;
    				document.getElementById('taux-1').value=taux1;
    				document.getElementById('palier1').value=h1;
    				document.getElementById('taux-2').value=taux2;
    				document.getElementById('palier-2').value=h2;
    				document.getElementById('sommehonoraires').value=honoraires;
    			}
    			else if (versement==0 && montantacompte>=p2 && montantacompte <=p3)
    			{
    				reste2=montantacompte-p1;
    				reste1=p1;
    				pc=(t1/100);
    				taux1=pc+1;
    				h1=((reste1*taux1)-reste1);
    				pc2=(t2/100);
    				taux2=pc2+1;
    				h2=((reste2*taux2)-reste2);
    				honoraires=(h1+h2);
    				document.getElementById('taux-1').value=taux1;
    				document.getElementById('palier1').value=h1;
    				document.getElementById('taux-2').value=taux2;
    				document.getElementById('palier2').value=h2;
    				document.getElementById('sommehonoraires').value=honoraires;
    			}
    			else if(versement<=p3 && versement>=p2 && (versement+montantacompte)>=p2 && (versement+montantacompte)<=$3)
    			{
    			reste1=montantacompte;
    			pc=($2/100);
    			taux1=pc+1;
    			h1=((reste1*taux1)-reste1);
    			honoraires=h1;	
    			document.getElementById('taux-1').value=taux1;
    			document.getElementById('palier1').value=h1;
    			document.getElementById('sommehonoraires').value=honoraires;
    			}
    			else if(versement>=p2 && versement<=p3 && (versement+montantacompte)>=p4)
    			{
    			reste1=p4-versement;
    			pc=(t2/100);
    			taux2=pc+1;
    			h2=((reste1*taux2)-reste1);
    			reste2=montantacompte-reste1;
    			pc2=(t3/100);
    			taux3=pc2+1;
    			h3=((reste2*taux3)-reste2);
    			honoraires=(h2+h3);
    			document.getElementById('taux-3').value=taux3;
    			document.getElementById('palier3').value=h3;
    			document.getElementById('taux-2').value=taux2;
    			document.getElementById('palier2').value=h2;
    			document.getElementById('sommehonoraires').value=honoraires;
    		}
    		else if(versement==0 && montantacompte>=p4)
    		{
    			reste1=p1;
    			reste2=p3-p2;
    			pc=(t1/100);
    			taux1=pc+1;
    			h1=((reste1*taux1)-reste1);
    			pc2=(t2/100);
    			taux2=pc2+1;
    			h2=((reste2*taux2)-reste2);
    			reste3=(montantacompte-reste1-reste2);
    			pc3=(t3/100);
    			taux3=pc3+1;
    			h3=((reste3*$taux3)-reste3);
    			honoraires=(h1+h2+h3);
    			document.getElementById('taux-1').value=taux1;
    			document.getElementById('palier1').value=h1;
    			document.getElementById('taux-3').value=taux3;
    			document.getElementById('palier3').value=h3;
    			document.getElementById('taux-2').value=taux2;
    			document.getElementById('palier2').value=h2;
    			document.getElementById('sommehonoraires').value=honoraires;
    		}
    	else if(versement>=p4)
    		{
    			reste3=montantacompte;
    			pc3=($3/100);
    			taux3=pc3+1;
    			h3=((reste3*taux3)-reste3);
    			honoraires=(h3);
    			document.getElementById('taux-3').value=taux3;
    			document.getElementById('palier3').value=h3;
    			document.getElementById('sommehonoraires').value=honoraires;
    		}
    	}
    	if (type=="l")
    	{
    	pc1=(t1/100);
    	taux1=pc1+1;
    	honoraires=montantacompte*taux1;
    	document.getElementById('taux-1').value=taux1;
    	document.getElementById('palier1').value=h1;
    	document.getElementById('sommehonoraires').value=honoraires;
    	}
     }
     
     </script><input type="text" name="montantacompte" id="montantacompte" onKeyUp="hono(p1,p2,p3,p4,t1,t2,t3,type,versement,montantacompte)"  />
    mais lorsque j'essai de l'exécuter il me dit dans la console:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Uncaught ReferenceError: hono is not defined test.php:157
    onkeyup
    je ne sais plus, j'ai que des erreurs pourtant j'ai tout essayé.

  14. #54
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Points : 15 059
    Points
    15 059
    Par défaut
    var type = 'document.getElementById("type").value;';
    Tu penses que type sera égal à quoi ?

  15. #55
    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 : 54
    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
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    onKeyUp="hono(p1,p2,p3,p4,t1,t2,t3,type,versement,montantacompte)"
    Il serait quand même temps que tu commences à réfléchir à ce que tu écris !
    A quoi te sers de passer des paramètres (qui de toute façon ne correspondent à rien ) si dans la fonction tu définis des variables avec le nom de ces paramètres !

  16. #56
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    bien même si je ne mets, rien ici il me dit toujours Uncaught ReferenceError: hono is not defined test.php:166
    onkeyup

  17. #57
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Points : 15 059
    Points
    15 059

  18. #58
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    bon, j'ai résolu l'affaire, en tout cas merci de votre aide.


    En fait j'utilisais une syntaxe obsolète:

    a savoir script language text/javascript

    j'ai mis maintenant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     <script type="text/javascript">
    et ça fonctionne.

    maintenant j'ai un dernier soucis en fait j'ai des nompbres à virgules avec nonante décimales, n'y a t'il pas un moyen de limiter a 2 décimales?

    d'avance merci.

  19. #59
    Rédacteur/Modérateur

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

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

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 640
    Points : 66 663
    Points
    66 663
    Billets dans le blog
    1
    Par défaut
    toFixed() toPrecision() Math.Round() ...

    et surtout une recherche sur ce forum avec "arrondi" ...

  20. #60
    Membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2007
    Messages
    197
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2007
    Messages : 197
    Points : 54
    Points
    54
    Par défaut
    gagné ! ! !

    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
     <script type="text/javascript">
     function hono(p1,p2,p3,p4,t1,t2,t3,type,versement,montantacompte)
     {
    	 var p1		 		= <?php if(isset($p1)) {echo $p1 ;} ?>;
     	 var p2		 		= <?php if(isset($p2)) {echo $p2 ;} ?>;
     	 var p3 			= <?php if(isset($p3)) {echo $p3 ;} ?>;
    	 var p4 			= <?php if(isset($p4)) {echo $p4 ;} ?>;
    	 var t1			 	= <?php if(isset($t1)) {echo $t1 ;} ?>;
    	 var t2 			= <?php if(isset($t2)) {echo $t2 ;} ?>;
    	 var t3 			= <?php if(isset($t3)) {echo $t3 ;} ?>;
    	 var type			= "<?php echo $type ; ?>";
     	 var versement  	= <?php if(isset($versement)) {$ver= str_replace(" ","", $versement); echo str_replace(",",".", $ver)  ;} ?>;
    	 var montantacompte	= document.getElementById("montantacompte").value;
     
     
    	 if (type== "d")
    	 	{
    			if(versement== 0.00 && montantacompte <= p1)
    			{
    				reste1= montantacompte;
    				pc= t1/100;
    				taux1= pc+1;
    				h1=((reste1*taux1)-reste1);
    				honoraires=h1;
    				document.getElementById('taux-1').value=t1;
    				document.getElementById('palier1').value=Math.round(h1*100)/100;
    				document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;
    			}
    			else if(versement < p1 && (versement + montantacompte) <= p1)
    			{
    				reste1= montantacompte;
    				pc= t1/100;
    				taux1= pc+1;
    				h1= (reste1*taux1)-reste1;
    				honoraires= h1;
    				document.getElementById('taux-1').value=t1;
    				document.getElementById('palier1').value=Math.round(h1*100)/100;;
    				document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;;
    			}
    			else if(versement <= p1 && (versement+montantacompte)>= p2 && (versement+montantacompte)<=p3)
    			{
    				reste1=p1-versement;
    				pc=t1/100;
    				taux1=pc+1;
    				h1=(reste1*taux1)-reste1;
    				reste2=montantacompte-reste1;
    				pc2=t2/100;
    				taux2=pc2+1;
    				h2=(reste2*taux2)-reste2;
    				honoraires=h1+h2;
    				document.getElementById('taux-1').value=t1;
    				document.getElementById('palier1').value=Math.round(h1*100)/100;;
    				document.getElementById('taux-2').value=t2;
    				document.getElementById('palier2').value=Math.round(h2*100)/100;;
    				document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;;
    			}
    			else if (versement==0.00 && montantacompte>=p2 && montantacompte <=p3)
    			{
    				reste2=montantacompte-p1;
    				reste1=p1;
    				pc=(t1/100);
    				taux1=pc+1;
    				h1=((reste1*taux1)-reste1);
    				pc2=(t2/100);
    				taux2=pc2+1;
    				h2=((reste2*taux2)-reste2);
    				honoraires=(h1+h2);
    				document.getElementById('taux-1').value=t1;
    				document.getElementById('palier1').value=Math.round(h1*100)/100;;
    				document.getElementById('taux-2').value=t2;
    				document.getElementById('palier2').value=Math.round(h2*100)/100;;
    				document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;;
    			}
    			else if(versement<=p3 && versement>=p2 && (versement+montantacompte)>=p2 && (versement+montantacompte)<=p3)
    			{
    			reste1=montantacompte;
    			pc=(t2/100);
    			taux1=pc+1;
    			h1=((reste1*taux1)-reste1);
    			honoraires=h1;	
    			document.getElementById('taux-1').value=t1;
    			document.getElementById('palier1').value=Math.round(h1*100)/100;;
    			document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;;
    			}
    			else if(versement>=p2 && versement<=p3 && (versement+montantacompte)>=p4)
    			{
    			reste1=p4-versement;
    			pc=(t2/100);
    			taux2=pc+1;
    			h2=((reste1*taux2)-reste1);
    			reste2=montantacompte-reste1;
    			pc2=(t3/100);
    			taux3=pc2+1;
    			h3=((reste2*taux3)-reste2);
    			honoraires=(h2+h3);
    			document.getElementById('taux-3').value=t3;
    			document.getElementById('palier3').value=Math.round(h3*100)/100;;
    			document.getElementById('taux-2').value=t2;
    			document.getElementById('palier2').value=Math.round(h2*100)/100;
    			document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;
    		}
    		else if(versement==0.00 && montantacompte>=p4)
    		{
    			reste1=p1;
    			reste2=p3-p2;
    			pc=(t1/100);
    			taux1=pc+1;
    			h1=((reste1*taux1)-reste1);
    			pc2=(t2/100);
    			taux2=pc2+1;
    			h2=((reste2*taux2)-reste2);
    			reste3=(montantacompte-reste1-reste2);
    			pc3=(t3/100);
    			taux3=pc3+1;
    			h3=((reste3*taux3)-reste3);
    			honoraires=(h1+h2+h3);
    			document.getElementById('taux-1').value=t1;
    			document.getElementById('palier1').value=Math.round(h1*100)/100;
    			document.getElementById('taux-2').value=t2;
    			document.getElementById('palier2').value=Math.round(h2*100)/100;
    			document.getElementById('taux-3').value=t3;
    			document.getElementById('palier3').value=Math.round(h3*100)/100;
    			document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;
    		}
    	else if(versement>=p4)
    		{
    			reste3=montantacompte;
    			pc3=(t3/100);
    			taux3=pc3+1;
    			h3=((reste3*taux3)-reste3);
    			honoraires=(h3);
     
    			document.getElementById('taux-3').value=t3;
    			document.getElementById('palier3').value=Math.round(h3*100)/100;
    			document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;
    		}
    	}
    	if (type=="l")
    	{
    	pc1=(t1/100);
    	taux1=pc1+1;
    	honoraires=montantacompte*taux1;
    	document.getElementById('taux-1').value=t1;
    	document.getElementById('palier1').value=Math.round(h1*100)/100;
    	document.getElementById('sommehonoraires').value=Math.round(honoraires*100)/100;
    	}
     }
     
     </script>
    Ma première impression après ma première fonction Javascript est qu'il y a beaucoup de similitudes avec le php, je ne sais pas si javascript est plus simple ou plus compliqué que php mais quoi qu'il en soit après avoir beaucoup appréhendé javascript, j'appréhende moins le ajax maintenant, je vais m'y plonger et je devrais y arriver;


    Merci à tous pour votre collaboration et votre aide précieuse.

    Bien à vous.

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

Discussions similaires

  1. [PHP-JS] Javascript ou PHP
    Par lynchmaniac dans le forum Langage
    Réponses: 7
    Dernier message: 27/10/2005, 10h10
  2. [PHP-JS] Javascript et PHP: passer une valeur en paramètres
    Par anutka dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 19/10/2005, 12h05
  3. Cherche conseils pour livre HTML, JavaScript et PHP
    Par oodini dans le forum Général Conception Web
    Réponses: 1
    Dernier message: 16/10/2005, 15h45
  4. [PHP-JS] convertir un bout javascript en php ?
    Par Thierry8 dans le forum Général JavaScript
    Réponses: 7
    Dernier message: 23/08/2005, 23h42
  5. [PHP-JS] lien javascript vers php
    Par guttts dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 19/08/2005, 23h00

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