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 :

Boucle JavaScript pour verif de formulaire


Sujet :

JavaScript

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    97
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 97
    Points : 56
    Points
    56
    Par défaut Boucle JavaScript pour verif de formulaire
    Bonjour,
    j'ai un petit probleme avec une boucle javascript, ca fait 2 jours que je seches, j'ai pratiquement tout essayé alors j'aurai besoin de lumiere exterieure...
    voila ma boucle:
    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
    function valider() {
    //alert('Message!!');
    var form_err = " ";
    var OK = 0;  // special débugage
    var i = 0;
    for ( var i = 0 ; i < 6 ; i++) {
    OK = i;  // pour débuggage
    if (( document.forms['saisieinci'].elements['etataction['+i+']'].value != "Approuvée" )&&( document.saisieinci.etat.value == "Soldée" )){
           form_err += "Impossible de solder cette FIA : "+
                          "etataction["+i+"]\n";
             }
         }
    if (form_err != " ")
         {
         alert(form_err);
         return false;
         }
              alert(form_err);
    alert('OK = '+OK); // débuggage
    return true;
    }
    et dans mon form il y a :
    <? boucle php...
    <select name="etataction['.$i.']"> ...

    par contre hors de la boucle, si je mets une valeur en dur de i, par
    exemple:
    document.forms['saisieinci'].elements['etataction[3]'].value
    cela fonctionne.....

    apparement c'est la boucle qui foire et i qui n'est pas bien pris en
    compte...
    une idée???

  2. #2
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 868
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 868
    Points : 16 258
    Points
    16 258
    Par défaut


    Commente ton if et mets ça à la place dans ton for .. :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    alert(document.forms['saisieinci'].elements['etataction['+i+']'].value);
    Ca te permettra de vérifier si tu as la bonne valeur.

    Chez moi ça fonctionne en tout cas.

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    97
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 97
    Points : 56
    Points
    56
    Par défaut
    idem:
    Erreur*: document.forms.saisieinci.elements["etataction[" + i + "]"] has no properties
    Fichier source*: http://intranet/modules.php?op=modlo...odif&numint=24
    Ligne*: 358

  4. #4
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 868
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 868
    Points : 16 258
    Points
    16 258
    Par défaut
    Citation Envoyé par VooDooNet
    idem:
    Erreur*: document.forms.saisieinci.elements["etataction[" + i + "]"] has no properties
    Fichier source*: http://intranet/modules.php?op=modlo...odif&numint=24
    Ligne*: 358
    ??

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    97
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 97
    Points : 56
    Points
    56
    Par défaut
    bah koi???
    c'est le message que me sort la console javascript de firefox avec ta modif....

  6. #6
    Expert éminent

    Avatar de denisC
    Profil pro
    Développeur Java
    Inscrit en
    Février 2005
    Messages
    4 050
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 4 050
    Points : 7 641
    Points
    7 641
    Par défaut
    Citation Envoyé par VooDooNet
    idem:
    Erreur*: document.forms.saisieinci.elements["etataction[" + i + "]"] has no properties
    Fichier source*: http://intranet/modules.php?op=modlo...odif&numint=24
    Ligne*: 358
    C'est laquelle la ligne 358? parceque le texte de l'erreur n'a pas l'air de correspondre au code que tu nous donne....

    C'est quoi le html généré par la page modules.php?

  7. #7
    Membre du Club
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    97
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 97
    Points : 56
    Points
    56
    Par défaut
    le code est trop long:
    Le texte que vous avez entré est trop long (84229 caractères). Veuillez le raccourcir à 30000 caractères....
    , mais bon puis que sans la boucle ca marche, ca doit venir du i non?
    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
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Company Europe Intranet :: Designed for your Needs!</title>
    <meta name="KEYWORDS" content="intranet,Company,Companyeurope,chimie, documents">
    <meta name="DESCRIPTION" content="Designed for your Needs!">
    <meta name="ROBOTS" content="INDEX,FOLLOW">
    <meta name="resource-type" content="document">
    <meta http-equiv="expires" content="0">
    <meta name="author" content="Company Europe Intranet">
    <meta name="copyright" content="Copyright (c) 2003 by Company Europe Intranet">
    <meta name="revisit-after" content="1 days">
    <meta name="distribution" content="Global">
    <meta name="generator" content="PostNuke 0.7.2.6-Phoenix - http://postnuke.com">
    <meta name="rating" content="General">
     
    <link rel="StyleSheet" href="themes/Windows-XP/style/styleNN.css" type="text/css">
    <style type="text/css">@import url("themes/Windows-XP/style/style.css"); </style>
    <script type="text/javascript" src="javascript/showimages.php"></script>
     
    <script type="text/javascript" src="javascript/openwindow.php?hlpfile="></script>
     
    <!--
    *****************************************************************
    Theme Name:  Windows-XP
    Version:     
     
    Description: 
     
    Author:      
    Contact:     
    *****************************************************************
    -->
     
    <!--
    ************************ AutoTheme 1.7 **************************
    -->
     
     
    <link rel="stylesheet" href="modules/AutoTheme/style/style.css" type="text/css">
    <link rel="stylesheet" type="text/css" href="style/style.css">
     
    </head>
    <body leftMargin="0" topMargin="0" marginwidth="0" marginheight="0" text="#000000">
    <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#b4b7ca" border="0"><tbody><tr><td width="33%" bgcolor="#b4b7ca"><table cellspacing="0" cellpadding="10" width="100%" border="0"><tbody><tr><td width="100%"><font class="pn-logo" color="#f3f4f7">Company Europe Intranet</font><br /><font class="pn-slogan" color="#f3f4f7">Designed for your Needs!</font></td></tr></tbody></table></td><td align="center">&nbsp;</td><td align="right" width="33%" bgcolor="#b4b7ca"><table cellspacing="0" cellpadding="10" width="200" border="0"><tbody><tr><td align="center" width="100%"><form action="modules.php" method="post">
      <input type="hidden" name="name" value="Search">
      <input type="hidden" name="file" value="index">
      <input type="hidden" name="op" value="modload">
      <input type="hidden" name="action" value="search">
      <input type="hidden" name="active_comments" value="1">
      <input type="hidden" name="active_downloads" value="1">
     
      <input type="hidden" name="active_faqs" value="1">
      <input type="hidden" name="active_reviews" value="1">
      <input type="hidden" name="active_sections" value="1">
      <input type="hidden" name="active_stories" value="1">
      <input type="hidden" name="active_users" value="1">
      <input type="hidden" name="active_weblinks" value="1">
      <input type="hidden" name="overview" value="1">
      <input type="hidden" name="bool" value="AND">
      <input type="hidden" name="stories_cat" value="">
     
      <input type="hidden" name="stories_topics" value="">
      <input type="text" name="q" value="" size="12">
    <input class="pn-button" type="submit" value="Rechercher sur Intranet">
    </form>
    </td></tr></tbody></table></td></tr></tbody></table><table cellspacing="0" cellpadding="0" width="100%" align="center" bgcolor="#f3f4f7" border="0"><tbody><tr><td bgcolor="#ffffff" colspan="4"><img height="1" alt="" hspace="0" src="http://intranet/themes/Windows-XP/images/pixel.gif" width="1" border="0" /></td></tr><tr valign="middle" bgcolor="#e0e2eb"><td valign="top" align="left" width="8" height="22"><img height="22" src="http://intranet/themes/Windows-XP/images/topnav-left.gif" width="8" /></td><td nowrap="true" background="themes/Windows-XP/images/topnav-bg.gif"><table cellspacing="0" cellpadding="0" width="200" border="0"><tbody><tr><td align="center">Welcome cedric.reymond!  <a href="http://intranet/user.php?module=NS-User&op=logout"><img src="images/logout.gif"></a> </td></tr></tbody></table></td><td align="center" width="100%" background="themes/Windows-XP/images/topnav-bg.gif" height="20"><!-- [user-intro] --></td><td valign="top" align="left" width="8" height="22"><img src="http://intranet/themes/Windows-XP/images/topnav-left.gif" /></td><td background="themes/Windows-XP/images/topnav-bg.gif"><table cellspacing="0" cellpadding="0" width="200" border="0"><tbody><tr><td align="center">Mardi 19 Septembre 2006</td></tr></tbody></table></td></tr><tr><td bgcolor="#e0e2eb" colspan="5"><img height="3" alt="" hspace="0" src="http://intranet/themes/Windows-XP/images/pixel.gif" width="1" border="0" /></td></tr><tr><td bgcolor="#aca899" colspan="5"><img height="1" alt="" hspace="0" src="http://intranet/themes/Windows-XP/images/pixel.gif" width="1" border="0" /></td></tr><tr><td bgcolor="#716f64" colspan="5"><img height="1" alt="" hspace="0" src="http://intranet/themes/Windows-XP/images/pixel.gif" width="1" border="0" /></td></tr></tbody></table><table cellspacing="0" cellpadding="10" width="100%" align="center" bgcolor="#ffffff" border="0"><tbody><tr valign="top"><td align="center" bgcolor="#b4b7ca"><table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr>
        <td vAlign="top" align="left" width="26" height="30">
        <img src="themes/Windows-XP/images/sidebox-title-left.gif"></td>
        <td vAlign="center" align="left" width="143" background="themes/Windows-XP/images/sidebox-title-bg.gif" height="30">
     
        <table border="0" cellpadding="4" cellspacing="0" width="100%">
          <tr>
            <td class="option" width="100%">
            <a href="modules.php?op=modload&amp;name=Blocks&amp;file=index&amp;req=ChangeStatus&amp;bid=148&amp;authid=34f8150045a976a95a6a16248623f28b"><img src="images/global/upb.gif" border="0" alt=""></a> Menu</td>
          </tr>
        </table>
        </td>
        <td vAlign="top" align="left" width="6" height="30">
     
        <img src="themes/Windows-XP/images/sidebox-title-right.gif"></td>
      </tr>
    </table>
    <table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr vAlign="top">
        <td vAlign="top" align="left" width="4" background="themes/Windows-XP/images/sidebox-bar-left.gif">
        <img src="themes/Windows-XP/images/sidebox-bar-px.gif"></td>
        <td vAlign="top" align="left" width="166" bgColor="#f0f1f5">
        <table border="0" cellpadding="4" cellspacing="0" width="100%">
          <tr>
     
            <td width="100%">
     
     
        <table>
          <tr><td>
        <div id='MenuPos' style='align:left; position:relative; width:108; height:162; border=0; z-index:100'><img src='modules/ActiveMenu/pnimages/pixel.gif' width='108' height='162' border=0;></div>
        </td></tr>
        </table>
        <script type='text/javascript'>
     
        //HV Menu v5.411- by Ger Versluis (http://www.burmees.nl/)
        //Submitted to Dynamic Drive (http://www.dynamicdrive.com)
        //Visit http://www.dynamicdrive.com for this script and more
        //PostNuke Module distribution by permission of Ger Versluis
        //Postnuke Module by Dennis Meulensteen (http://www.meulensteen.nl)
     
        function Go(){return}
        </script>
        <script type='text/javascript'>
        	var NoOffFirstLineMenus=9; 
        var LowBgColor='#f0f1f5'; 
        var HighBgColor='white'; 
        var LowSubBgColor='#ffcc33'; 
        var HighSubBgColor='white'; 
        var FontLowColor='#363636'; 
        var FontSubLowColor='black'; 
        var FontHighColor='red'; 
        var FontSubHighColor='red'; 
        var BorderColor='#f0f1f5'; 
        var BorderSubColor='#363636'; 
        var BorderWidth=1; 
        var BorderBtwnElmnts=1; 
        var FontFamily='arial,comic sans ms,technical'; 
        var FontSize=8; 
        var FontBold=1; 
        var FontItalic=0; 
        var MenuTextCentered='left'; 
        var MenuCentered='left'; 
        var MenuVerticalCentered='top'; 
        var ChildOverlap=.3; 
        var ChildVerticalOverlap=.2; 
        var StartTop=0; 
        var StartLeft=0; 
        var VerCorrect=0; 
        var HorCorrect=1; 
        var LeftPaddng=3; 
        var TopPaddng=2; 
        var FirstLineHorizontal=0; 
        var MenuFramesVertical=1; 
        var DissapearDelay=500; 
        var TakeOverBgColor=1; 
        var FirstLineFrame='navig'; 
        var SecLineFrame='space'; 
        var DocTargetFrame='space'; 
        var TargetLoc='MenuPos'; 
        var HideTop=0; 
        var MenuWrap=1; 
        var RightToLeft=0; 
        var UnfoldsOnClick=0; 
        var WebMasterCheck=0; 
        var ShowArrow=1; 
        var KeepHilite=1; 
        var Arrws=['modules/ActiveMenu/pnimages/tri.gif',8,12,'modules/ActiveMenu/pnimages/tridown.gif',10,15,'modules/ActiveMenu/pnimages/trileft.gif',10,15]; 
     
     
        function BeforeStart(){return}
        function AfterBuild(){return}
        function BeforeFirstOpen(){return}
        function AfterCloseAll(){return}
     
     
      Menu1=new Array("Accueil","http://intranet","",4,18,120); 
      Menu1_1=new Array("Mon Compte","http://intranet/user.php","",0,18,120); 
      Menu1_2=new Array("Mes Email","http://intranet/modules.php?op=modload&name=Fr_Mail&file=index","",0,18,120); 
      Menu1_3=new Array("Tickets","http://intranet/modules.php?op=modload&name=hd&file=index","",0,18,120); 
      Menu1_4=new Array("Travaux","http://intranet/modules.php?op=modload&name=Wo&file=index","",0,18,120); 
      Menu2=new Array("ASSE","http://intranet/modules.php?op=modload&name=foot&file=index","",0,18,120); 
      Menu3=new Array("CE","","",7,18,120); 
      Menu3_1=new Array("Membres","http://intranet/modules.php?op=modload&name=CE&file=index","",0,18,120); 
      Menu3_2=new Array("Saisie membres","http://intranet/modules.php?op=modload&name=CE&file=saisie_mb","",0,18,120); 
      Menu3_3=new Array("Présentation","http://intranet/modules.php?op=modload&name=CE&file=presentation","",0,18,120); 
      Menu3_4=new Array("Materiel Consult","http://intranet/modules.php?op=modload&name=CE&file=consult","",0,18,120); 
      Menu3_5=new Array("Gestion Matos","http://intranet/modules.php?op=modload&name=CE&file=resa_mat","",0,18,120); 
      Menu3_6=new Array("Spectacles","http://intranet/modules.php?op=modload&name=CE&file=spectacle","",0,18,120); 
      Menu3_7=new Array("Gestion Spect","http://intranet/modules.php?op=modload&name=CE&file=traitement_spectacle","",0,18,120); 
      Menu4=new Array("Interne","","",13,18,120); 
      Menu4_1=new Array("Agenda","http://intranet/modules.php?op=modload&name=Calendar_VOR&file=index","",0,18,120); 
      Menu4_2=new Array("Annuaire Company","http://intranet/modules.php?op=modload&name=Annuaire_US&file=index","",0,18,120); 
      Menu4_3=new Array("Annuaire Voreppe","http://192.150.150.13/cgi-bin/WebClient.exe?Action=Main&SrvLdap=FR-ADMINPHONES&PortLdap=389&BaseSearch=o%3DDirectoryRoot&Langue=fr","",0,18,120); 
      Menu4_4=new Array("Documents","http://intranet/modules.php?op=modload&name=Docs&file=index","",0,18,120); 
      Menu4_5=new Array("Docs Admin","http://intranet/admin.php?module=Docs&op=main","",0,18,120); 
      Menu4_6=new Array("Forums","http://intranet/modules.php?op=modload&name=PNphpBB2&file=index","",0,18,120); 
      Menu4_7=new Array("Montreux Conf","file:///\\serv-nas\\MontreuxConf\\Congress10-06.doc","",0,18,120); 
      Menu4_8=new Array("Photos","http://intranet/modules.php?op=modload&name=Photoshare&file=index","",0,18,120); 
      Menu4_9=new Array("Portail Web","http://intranet/modules.php?op=modload&name=Web_Links&file=index","",0,18,120); 
      Menu4_10=new Array("Proposer Nouvelle","http://intranet/modules.php?op=modload&name=Submit_News&file=index","",0,18,120); 
      Menu4_11=new Array("Presents Voreppe","http://intranet/modules.php?op=modload&name=Keepset&file=index","",0,18,120); 
      Menu4_12=new Array("Support Info","http://intranet/modules.php?op=modload&name=hd&file=index","",0,18,120); 
      Menu4_13=new Array("SMS","http://intranet/modules.php?op=modload&name=sms&file=index","",0,18,120); 
      Menu5=new Array("Labo","http://intranet/modules.php?op=modload&name=Fds&file=index","",3,18,120); 
      Menu5_1=new Array("FDS/MSDS","http://intranet/modules.php?op=modload&name=Fds&file=index","",0,18,120); 
      Menu5_2=new Array("LIMS","http://stpprod.Company.com/","",0,18,120); 
      Menu5_3=new Array("Methodes US","http://192.150.150.2/basesus/methods.nsf","",0,18,120); 
      Menu6=new Array("Production","","",10,18,120); 
      Menu6_1=new Array("Cuves&Reacteurs","http://intranet/modules.php?op=modload&name=Prod_Reacteurs&file=index","",0,18,120); 
      Menu6_2=new Array("DmdeTravaux","http://intranet/modules.php?op=modload&name=Wo&file=index","",0,18,120); 
      Menu6_3=new Array("Données&Graph","http://intranet/modules.php?op=modload&name=Prod_Graph&file=index","",0,18,120); 
      Menu6_4=new Array("Eti-Cond","http://intranet/modules.php?op=modload&name=Prod_Labels&file=print_cond1","",0,18,120); 
      Menu6_5=new Array("Eti-Stock","http://intranet/modules.php?op=modload&name=Prod_Labels&file=print_stock1","",0,18,120); 
      Menu6_6=new Array("InstructionsFab","http://intranet/modules.php?op=modload&name=Docs&file=index&req=viewdownload&cid=88","",0,18,120); 
      Menu6_7=new Array("Process","http://intranet/modules.php?op=modload&name=Prod_Process&file=index","",0,18,120); 
      Menu6_8=new Array("Select Server","http://serveur3:3669/","",0,18,120); 
      Menu6_9=new Array("Uk Tank Levels","http://intranet/modules.php?op=modload&name=Uktanklevels&file=index","",0,18,120); 
      Menu6_10=new Array("Vidéo","http://intranet/modules.php?op=modload&name=Video_Parking&file=index","",0,18,120); 
      Menu7=new Array("QSE","http://intranet/modules.php?op=modload&name=Docs&file=index&req=viewdownload&cid=15","",7,18,120); 
      Menu7_1=new Array("Actions Qualité","http://intranet/modules/docs/uploads/qse/qualite/actionsQ.xls","",0,18,120); 
      Menu7_2=new Array("Docs Qualité","http://intranet/modules.php?op=modload&name=Docs&file=index&req=viewdownload&cid=15","",0,18,120); 
      Menu7_3=new Array("Docs HSE","http://intranet/modules.php?op=modload&name=Docs&file=index&req=viewdownload&cid=13","",0,18,120); 
      Menu7_4=new Array("FIA","http://intranet/modules.php?op=modload&name=Incidents&file=index","",0,18,120); 
      Menu7_5=new Array("Formations","http://intranet/moodle","",0,18,120); 
      Menu7_6=new Array("Matrice EPI","http://intranet/modules.php?op=modload&name=Docs&file=index&req=getit&lid=1171","",0,16,120); 
      Menu7_7=new Array("Scénarios POI","http://intranet/modules.php?op=modload&name=POI&file=index","",0,18,120); 
      Menu8=new Array("Recherche","http://intranet/modules.php?op=modload&name=Search&file=index","",2,18,120); 
      Menu8_1=new Array("Intranet","http://intranet/modules.php?op=modload&name=Search&file=index","",0,18,120); 
      Menu8_2=new Array("Internet","http://intranet/modules.php?op=modload&name=Web_Links&file=index&req=viewlink&cid=5","",0,18,120); 
      Menu9=new Array("Company US Intranet","http://home.Company.com","",0,16,120); 
     
    </script>
     
        <script type='text/javascript' src='modules/ActiveMenu/menu_com.js'></script>
        <noscript>Your browser does not support script</noscript>
    </td>
          </tr>
        </table>
        </td>
        <td vAlign="top" align="left" width="4" background="themes/Windows-XP/images/sidebox-bar-right.gif">
     
        <img src="themes/Windows-XP/images/sidebox-bar-px.gif"></td>
      </tr>
    </table>
    <table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr>
        <td vAlign="top" align="left" width="175" height="29">
        <img src="themes/Windows-XP/images/sidebox-bottom.gif"></td>
      </tr>
    </table>
    <br /><table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr>
     
        <td vAlign="top" align="left" width="26" height="30">
        <img src="themes/Windows-XP/images/sidebox-title-left.gif"></td>
        <td vAlign="center" align="left" width="143" background="themes/Windows-XP/images/sidebox-title-bg.gif" height="30">
        <table border="0" cellpadding="4" cellspacing="0" width="100%">
          <tr>
            <td class="option" width="100%">
            <a href="modules.php?op=modload&amp;name=Blocks&amp;file=index&amp;req=ChangeStatus&amp;bid=30&amp;authid=34f8150045a976a95a6a16248623f28b"><img src="images/global/upb.gif" border="0" alt=""></a> Admin Powaaa !</td>
          </tr>
     
        </table>
        </td>
        <td vAlign="top" align="left" width="6" height="30">
        <img src="themes/Windows-XP/images/sidebox-title-right.gif"></td>
      </tr>
    </table>
    <table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr vAlign="top">
        <td vAlign="top" align="left" width="4" background="themes/Windows-XP/images/sidebox-bar-left.gif">
        <img src="themes/Windows-XP/images/sidebox-bar-px.gif"></td>
     
        <td vAlign="top" align="left" width="166" bgColor="#f0f1f5">
        <table border="0" cellpadding="4" cellspacing="0" width="100%">
          <tr>
            <td width="100%">
            <br><center><form method="post" action="index.php"><select class="pn-text" name="newlanguage" onChange="top.location.href=this.options[this.selectedIndex].value"><option>-----</option><option value="admin.php">Administration</option><option value="http://intranet/networkcourse/accueil.htm">Cours Réseaux</option><option value="http://intranet/admin.php?module=Docs&op=main">Docs Interne</option><option value="http://fr-apps1:24500">FormScape</option><option value="modules.php?op=modload&amp;name=ParcInfo&amp;file=index">Gestion du Parc</option><option value="http://fr-printers:9090/wsdm/index.jsp">Imprimantes</option><option value="modules.php?op=modload&amp;name=Info_Virus&amp;file=index">Info Virus</option><option value="modules.php?op=modload&amp;name=ITProjects&amp;file=index">IT Projects</option><option value="https://195.68.51.203">Manga Balance Voreppe</option><option value="https://fr-nas:1279">NAS</option><option value="http://fr-wsus/wsusadmin/">WSUS</option><option>-----</option><option value="http://192.150.150.11/commoncgi/servlet/CCGIServlet?ApHost=PDT_InterScan_NT&CGIAlias=PDT_InterScan_NT&Page=file:index.htm.xhtml">IMSS</option><option value="modules.php?op=modload&amp;name=Info_Links&amp;file=index">Liens Divers</option><option value="https://192.150.150.18:4343/officescan/console/cgi/cgiChkMasterPwd.exe">Office Scan</option><option value="modules.php?op=modload&amp;name=webquery&amp;file=index">Outils Réso</option><option>-----</option><option value="http://192.150.150.13">OXE 4760</option><option value="http://192.150.150.19:8081/prtg.htm">Stats Europe</option><option value="modules.php?op=modload&amp;name=Stats&amp;file=index">Stats Intranet</option><option value="http://radius.Company.com/scripts/routers2.pl">Routeurs FrameRelay</option><option>-----</option><option value="modules.php?op=modload&name=Video_Parking&file=admin">Vidéo Parking</option><option value="modules.php?op=modload&amp;name=HD&amp;file=index">HelpDesk</option><option value="modules.php?op=modload&amp;name=FAQ&amp;file=index">FAQ</option><option value="index.php?module=EPBL&amp;func=main">Test project</option></select></form></center></td>
     
          </tr>
        </table>
        </td>
        <td vAlign="top" align="left" width="4" background="themes/Windows-XP/images/sidebox-bar-right.gif">
        <img src="themes/Windows-XP/images/sidebox-bar-px.gif"></td>
      </tr>
    </table>
    <table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr>
        <td vAlign="top" align="left" width="175" height="29">
     
        <img src="themes/Windows-XP/images/sidebox-bottom.gif"></td>
      </tr>
    </table>
    <br /><table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr>
        <td vAlign="top" align="left" width="26" height="30">
        <img src="themes/Windows-XP/images/sidebox-title-left.gif"></td>
        <td vAlign="center" align="left" width="143" background="themes/Windows-XP/images/sidebox-title-bg.gif" height="30">
        <table border="0" cellpadding="4" cellspacing="0" width="100%">
          <tr>
     
            <td class="option" width="100%">
            <a href="modules.php?op=modload&amp;name=Blocks&amp;file=index&amp;req=ChangeStatus&amp;bid=5&amp;authid=34f8150045a976a95a6a16248623f28b"><img src="images/global/upb.gif" border="0" alt=""></a> Menu pour cedric.reymond</td>
          </tr>
        </table>
        </td>
        <td vAlign="top" align="left" width="6" height="30">
        <img src="themes/Windows-XP/images/sidebox-title-right.gif"></td>
      </tr>
     
    </table>
    <table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr vAlign="top">
        <td vAlign="top" align="left" width="4" background="themes/Windows-XP/images/sidebox-bar-left.gif">
        <img src="themes/Windows-XP/images/sidebox-bar-px.gif"></td>
        <td vAlign="top" align="left" width="166" bgColor="#f0f1f5">
        <table border="0" cellpadding="4" cellspacing="0" width="100%">
          <tr>
            <td width="100%">
            <a href="http://www.tsln.fr.st">TSLN</a>
     
    <a href="http://www.pagesjaunes.fr">Pagesjaunes</a></td>
          </tr>
        </table>
        </td>
        <td vAlign="top" align="left" width="4" background="themes/Windows-XP/images/sidebox-bar-right.gif">
        <img src="themes/Windows-XP/images/sidebox-bar-px.gif"></td>
      </tr>
    </table>
    <table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr>
     
        <td vAlign="top" align="left" width="175" height="29">
        <img src="themes/Windows-XP/images/sidebox-bottom.gif"></td>
      </tr>
    </table>
    <br /><table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr>
        <td vAlign="top" align="left" width="26" height="30">
        <img src="themes/Windows-XP/images/sidebox-title-left.gif"></td>
        <td vAlign="center" align="left" width="143" background="themes/Windows-XP/images/sidebox-title-bg.gif" height="30">
        <table border="0" cellpadding="4" cellspacing="0" width="100%">
     
          <tr>
            <td class="option" width="100%">
            <a href="modules.php?op=modload&amp;name=Blocks&amp;file=index&amp;req=ChangeStatus&amp;bid=8&amp;authid=34f8150045a976a95a6a16248623f28b"><img src="images/global/upb.gif" border="0" alt=""></a> Langues</td>
          </tr>
        </table>
        </td>
        <td vAlign="top" align="left" width="6" height="30">
        <img src="themes/Windows-XP/images/sidebox-title-right.gif"></td>
     
      </tr>
    </table>
    <table cellSpacing="0" cellPadding="0" width="175" border="0">
      <tr vAlign="top">
        <td vAlign="top" align="left" width="4" background="themes/Windows-XP/images/sidebox-bar-left.gif">
        <img src="themes/Windows-XP/images/sidebox-bar-px.gif"></td>
        <td vAlign="top" align="left" width="166" bgColor="#f0f1f5">
        <table border="0" cellpadding="4" cellspacing="0" width="100%">
          <tr>
            <td width="100%">
     
            <center><font class="pn-normal">Choisissez la langue de l'interface :</font><br><br><a href="modules.php?op=modload&name=Incidents&file=inci-modif&newlang=eng"><img src="images/flags/flag-eng.png" border="0" alt="Anglais" hspace="3" vspace="3" width="30" height="16"></a><a href="modules.php?op=modload&name=Incidents&file=inci-modif&newlang=fra"><img src="images/flags/flag-fra.png" border="0" alt="Français" hspace="3" vspace="3" width="30" height="16"></a><a href=# onclick="window.open('modules/NS-Languages/help/choixlangue.php','Choix_de_la_langue','width=450,height=260,menubar=1,status=1,scrollbars=1');return(false)"><img src="images/global/help.gif" width="17" height="17" title="Accéder à l'aide en ligne de cet écran"></a></center></td>
          </tr>
        </table>
        </td>
        <td vAlign="top" align="left" width="4" background="themes/Windows-XP/images/sidebox-bar-right.gif">
        <img src="themes/Windows-XP/images/sidebox-bar-px.gif"></td>
      </tr>
    </table>
    <table cellSpacing="0" cellPadding="0" width="175" border="0">
     
      <tr>
        <td vAlign="top" align="left" width="175" height="29">
        <img src="themes/Windows-XP/images/sidebox-bottom.gif"></td>
      </tr>
    </table>
    <br /></td><td align="center" width="100%"><br /><table cellspacing="0" cellpadding="0" width="100%" border="0"><tbody><tr><td valign="top" width="50%"></td><td> </td><td valign="top" width="50%"></td></tr></tbody></table><br />
    <head>
    <script language="JavaScript">
    <!--
    function valider() {
    //alert('Message!!');
    var form_err = " ";
    var OK = 0;  // special débugage
    var i = 0;
    for ( var i = 0 ; i < 6 ; i++) {
    OK = i;  // pour débuggage
    alert(document.forms['saisieinci'].elements['etataction['+i+']'].value);
         }
    if (form_err != " ")
         {
         alert(form_err);
         return false;
         }
              alert(form_err);
    alert('OK = '+OK); // débuggage
    return true;
    }
     
    //-->
    </script>
    ...

  8. #8
    Expert éminent

    Avatar de denisC
    Profil pro
    Développeur Java
    Inscrit en
    Février 2005
    Messages
    4 050
    Détails du profil
    Informations personnelles :
    Âge : 44
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 4 050
    Points : 7 641
    Points
    7 641
    Par défaut
    Citation Envoyé par VooDooNet
    , mais bon puis que sans la boucle ca marche, ca doit venir du i non?
    Ce qui m'étonne quelque peu, c'est que dans ton erreur il dit:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    Erreur*: document.forms.saisieinci.elements["etataction[" + i + "]"] has no properties
    Alors que dans le morceau de code que tu nous montre, tu as:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    if (( document.forms['saisieinci'].elements['etataction['+i+']'].value != "Approuvée" )
    C'est pas la même syntaxe!!!! D'ou mon doute sur le fait que ce soit la même ligne des deux cotés.....

    Sinon, ça ressemble à un problème de cohérence de guillemets/quotes (puisqu'il ne remplace pas i par sa valeur).

  9. #9
    Membre du Club
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    97
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 97
    Points : 56
    Points
    56
    Par défaut
    Citation Envoyé par denisC
    C'est pas la même syntaxe!!!! D'ou mon doute sur le fait que ce soit la même ligne des deux cotés.....

    Sinon, ça ressemble à un problème de cohérence de guillemets/quotes (puisqu'il ne remplace pas i par sa valeur).
    je sais, j'ai tiqué sur ca aussi, mais apparemment c firefox qui remplace les simples quotes par des doubles dans la console javascrpit. Le code source lui est bon, dans firefox comme dans le fichier php....

  10. #10
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 868
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 868
    Points : 16 258
    Points
    16 258
    Par défaut
    @denisC : D'où mon post reprenant l'erreur en rouge ...

    @VooDooNet : Parce que la console supprime aussi les crochets qu'à un seul endroit sur les deux ?

  11. #11
    Membre du Club
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    97
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 97
    Points : 56
    Points
    56
    Par défaut
    [QUOTE=BisounoursJ
    @VooDooNet : Parce que la console supprime aussi les crochets qu'à un seul endroit sur les deux ?[/QUOTE]
    bah j'y peux rien moi ....


    arf je suis confus....
    mes elements etataction commence à 1......
    mais les messages d'erreur de firefox sont un peu bizarre....
    Merci à vous!

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 2
    Dernier message: 14/03/2008, 14h16
  2. Réponses: 4
    Dernier message: 27/07/2007, 16h52
  3. javascript pour récuperer les valeurs d'un formulaire html
    Par BetterWorld dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 18/05/2007, 12h09
  4. [PHP-JS] PHP et JavaScript pour les formulaires
    Par Ylias dans le forum Général JavaScript
    Réponses: 11
    Dernier message: 26/07/2006, 22h47
  5. Norme JavaScript pour les formulaire
    Par rdams dans le forum Général JavaScript
    Réponses: 6
    Dernier message: 23/09/2005, 14h14

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