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

Langage PHP Discussion :

[PHP-JS] Problème condition empty()


Sujet :

Langage PHP

  1. #21
    Membre habitué
    Profil pro
    Inscrit en
    Février 2006
    Messages
    109
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 109
    Points : 131
    Points
    131
    Par défaut
    Citation Envoyé par vincedjs
    J'ai essayé Mr n, toujours pareil
    Bon bha .. trop tard ..

  2. #22
    Membre habitué
    Profil pro
    Inscrit en
    Février 2006
    Messages
    109
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 109
    Points : 131
    Points
    131
    Par défaut
    Fait un echo de ta variable POST pour voir ce qu'il y a dedans ..
    Et dans ton INPUT met un value
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <input name="textfieldsearch" type="text" id="textfieldsearch" VALUE="TEST">
    il doit retourner TEST!

  3. #23
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    avant ton if, que donne le résultat de cette ligne après postage du formulaire ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    var_dump&#40;'<pre>', $_POST, '</pre>'&#41;;die&#40;&#41;;
    Tu es sur que ton formulaire a pour attribut method="POST" ?

  4. #24
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 295
    Points : 87
    Points
    87
    Par défaut
    merci de vos réponses, désolé j'ai une urgence, je reprend ca demain matin merci

  5. #25
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 295
    Points : 87
    Points
    87
    Par défaut
    Citation Envoyé par Mr N.
    avant ton if, que donne le résultat de cette ligne après postage du formulaire ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    var_dump&#40;'<pre>', $_POST, '</pre>'&#41;;die&#40;&#41;;
    Tu es sur que ton formulaire a pour attribut method="POST" ?
    ca donne:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    string&#40;5&#41; "
    "
    array&#40;10&#41; &#123;
      &#91;"menuclick"&#93;=>
      string&#40;0&#41; ""
      &#91;"numfiche"&#93;=>
      string&#40;11&#41; "Automatique"
      &#91;"checkbox_privee"&#93;=>
      string&#40;6&#41; "privee"
      &#91;"nomfiche"&#93;=>
      string&#40;7&#41; "z4dz84d"
      &#91;"textfield"&#93;=>
      string&#40;1&#41; "9"
      &#91;"datefiche"&#93;=>
      string&#40;11&#41; "Automatique"
      &#91;"logincreafiche"&#93;=>
      string&#40;11&#41; "Automatique"
      &#91;"textarea"&#93;=>
      string&#40;2&#41; "zd"
      &#91;"textarea2"&#93;=>
      string&#40;2&#41; "fa"
      &#91;"btr"&#93;=>
      string&#40;2&#41; "PO"
    &#125;
    string&#40;6&#41; "
    "
    et pour le formulaire:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <form id="form1" name="form1" method="post" action="" onsubmit="return testsubmit&#40;&#41;">
    return testsubmit est lié à
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <script language="JavaScript" type="text/javascript"> 
    function testsubmit&#40;&#41;
    	&#123;
        if &#40;document.form1.action==""&#41; return false; 
    return true;
    	&#125; 
    function gopage&#40;page&#41; 
    	&#123;
    document.form1.action = page; 
    document.form1.submit&#40;&#41;;
    	&#125; 
    </script>
    et cela fonctionne trés bien avec mon 2eme form2 ou j ai la meme fonction avec document.form2.action bien sur

    dev:

    Fait un echo de ta variable POST pour voir ce qu'il y a dedans ..
    Et dans ton INPUT met un value
    ca ne donne rien

  6. #26
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 295
    Points : 87
    Points
    87
    Par défaut
    j ai donc 2 forms avec 2 fonction javascripts
    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
    <script language="JavaScript" type="text/javascript"> 
    function testsubmit&#40;&#41;
    	&#123;
        if &#40;document.form1.action==""&#41; return false; 
    return true;
    	&#125; 
    function gopage&#40;page&#41; 
    	&#123;
    document.form1.action = page; 
    document.form1.submit&#40;&#41;;
    	&#125; 
    </script>
    <script language="JavaScript" type="text/javascript"> 
    function testsubmit2&#40;&#41;
    	&#123;
        if &#40;document.form2.action==""&#41; return false; 
    return true;
    	&#125; 
    function gopage&#40;page&#41; 
    	&#123;
    document.form2.action = page; 
    document.form2.submit&#40;&#41;;
    	&#125;  
    </script>
    Pour mon 2eme formulaire totu est posté pour le 1er aucuns

  7. #27
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Tu n'aurais pas un exemple en live par hasard ?

  8. #28
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 295
    Points : 87
    Points
    87
    Par défaut
    Bein avec le form2

    ( fiche de renseignement )

    quand j'enregistre ( bouton enregistrer une fiche )
    le nom de Fiche saisie est bien posté

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <input name="nomfiche" type="text" id="nomfiche" value="" size="20" maxlength="20" />
    appartenant donc à
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
       <form id="form2" name="form2" form="form" action="" onsubmit="return testsubmit2&#40;&#41;" 
    				  method="post" enctype="multipart/form-data" >
    lié a la fonction coller précédement

    et donc le bouton enregistrer :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     <input name="Enregistrer" type="button" class="bouton" id="Enregistrer" value="Enregistrer" onclick="gopage&#40;'traitementfiche.php'&#41;"/>
    envoi bien vers la page de traitement ou je recoi correctement les données

  9. #29
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Je te parle plutot d'une adresse que l'on puisse tester nous même, genre une page temporaire sur ton site perso ou autre.

    Est-ce que tu peux coller ici le code source de la page générée (menu affichage du navigateur) Où on peut voir tes formulaires et ton champ fantome...

  10. #30
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 295
    Points : 87
    Points
    87
    Par défaut
    c est en local pas d adresse
    sinon la page génèré est vide
    et voici mon accueil.php ou il a mes formulaire on m'on fameux champ de recherche 'textfieldsearch' tu l'aura voulu


    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
    <?php 
    session_start&#40;&#41;;
    include &#40;'secure.php'&#41;;?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http&#58;//www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Top secret hihi</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript"> 
    function testsubmit&#40;&#41;
    	&#123;
        if &#40;document.form1.action==""&#41; return false; 
    return true;
    	&#125; 
    function gopage&#40;page&#41; 
    	&#123;
    document.form1.action = page; 
    document.form1.submit&#40;&#41;;
    	&#125; 
    </script>
    <script language="JavaScript" type="text/javascript"> 
    function testsubmit2&#40;&#41;
    	&#123;
        if &#40;document.form2.action==""&#41; return false; 
    return true;
    	&#125; 
    function gopage&#40;page&#41; 
    	&#123;
    document.form2.action = page; 
    document.form2.submit&#40;&#41;;
    	&#125;  
    </script>
    </head>
    <body onload="document.form1.textfieldsearch.focus&#40;&#41;">
    <table width="971" height="192" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
      <tr>
        <th width="971" height="125" align="center" valign="middle" bgcolor="#E7E7E7" scope="col">
    	<table width="1032" height="104" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <th width="1032" align="left" valign="top" scope="col">
    		    <table width="934" height="1313" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                  <tr>
                    <th width="934" height="1313" align="left" valign="top" scope="col">
    				<table width="701" height="150" border="0" cellpadding="0" bgcolor="#FFFFFF">
                        <tr>
                          <th width="256" height="146" align="right" valign="top" bgcolor="#FFFFFF" scope="row">
    					  <img src="images/logorbdcblanc.jpg" alt ="7" width="229" height="136" /></th>
                          <td width="439" align="right" valign="top" bgcolor="#FFFFFF">
    					  <table width="386" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <th width="386" align="left" valign="top" scope="col">
    							<form id="form1" name="form1" form="form" method="post" action="" onsubmit="return testsubmit&#40;&#41;">
                                    <table width="350" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <th width="249" height="47" scope="col"><strong class="entetelarge">
    									<u>Recherche par mots cl&eacute;s &#58;</u></strong></th>
                                        <th width="101" scope="col"><span class="entetelarge">
                                          <label><u>Projet &#58;</u></label>
                                        </span></th>
                                      </tr>
                                    </table>
                                    <table width="366" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <th width="186" height="51" scope="col">
    									<input name="textfieldsearch" type="text" 
    									id="textfieldsearch" size="25" maxlength="30" value="test"/></th>
                                        <th width="40" align="left" valign="middle" scope="col">
    								    <input name="bt_search" type="button" class="bouton" id="bt_search" 
    									  value="ok" onclick="gopage&#40;'traitementsearch.php'&#41;"/></th>
                                        <th width="47" align="right" valign="middle" scope="col"><span class="Gras">
                                          <input type="radio" name="btprojet" value="MIS" checked="checked" />
                                        </span></th>
                                        <th width="77" align="left" valign="middle" scope="col">
    									<span class="Gras">MIS </span></th>
                                      </tr>
                                    </table>
                                    <table width="366" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <th width="187" scope="col"><div align="center">
                                            <select name="selectsearch" id="selectsearch">
                                            </select>
     
                                        </div></th>
                                        <th width="36" align="left" valign="middle" scope="col">
    									<input name="bt_envoi_search" type="button" class="bouton" 
    									  id="bt_envoi_search" 
    									  value="ok" onclick="gopage&#40;'searchfiche.php'&#41;"/></th>
                                        <th width="50" align="right" valign="middle" scope="col"><strong>
                                          <input type="radio" name="btprojet" value="REDLIFT" />
                                        </strong></th>
                                        <th width="77" align="left" valign="middle" scope="col">
    									<strong>REDLIFT </strong></th>
                                      </tr>
                                    </table>
                                </form></th>
                              </tr>
                          </table></td>
                        </tr>
                      </table>
                      <form id="form2" name="form2" form="form" action="" onsubmit="return testsubmit2&#40;&#41;" 
    				  method="post" enctype="multipart/form-data" >
                        <table width="566" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <th width="116" height="921" scope="col">&nbsp;</th>
                            <th width="170" scope="col"><table width="820" height="1048" border="0" 
    						cellpadding="0" cellspacing="0">
                                <tr>
                                  <td height="41" align="center" valign="top">&nbsp;</td>
                                  <td align="left" valign="top"><table width="452" border="0" 
    							  cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="449" height="35" align="center" valign="middle">
    								  <img src="images/barrehnoir.gif" alt="a" width="237" height="17" /></td>
                                    </tr>
                                  </table></td>
                                  <td align="center" valign="top">&nbsp;</td>
                                </tr>
                                <tr>
                                  <td width="173" height="902" align="center" valign="top">
    							  <table width="173" border="0" cellpadding="0" cellspacing="0">
                                      <tr>
                                        <th scope="col">&nbsp;</th>
                                        <th align="center" valign="bottom" scope="col">
    									<img src="images/rechercheimg.jpg" alt="f" width="148" height="45" /></th>
                                      </tr>
                                      <?php //insert le menu
    								  include &#40;'menu.php'&#41;;
    								  //champ caché?>
    								  <input type="hidden" name="menuclick" value="" /> 
                                  </table></td>
                                  <td width="453" align="left" valign="top">
    							  <table width="452" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td width="83" align="right" valign="bottom">
    									<span class="Style3">Fiche n&deg; </span></td>
                                        <td width="216" align="left" valign="bottom"><input name="numfiche" 
    									type="text" class="Gras" id="numfiche" value="Automatique" size="12" maxlength="12" /></td>
                                        <td width="153" align="left" valign="bottom"><label>
                                            <span class="Style3">Priv&eacute;e&#58;</span>
                                            <input name="checkbox_privee" type="checkbox" 
    									id="checkbox_privee" value="privee"/>
                                        </label></td>
                                      </tr>
                                      <tr>
                                        <td height="42" align="right" valign="bottom" 
    									class="Style3">Nom fiche &#58; </td>
                                        <td align="left" valign="bottom">
    									<input name="nomfiche" type="text" id="nomfiche" value="" 
    									size="20" maxlength="20" /></td>
                                        <td align="left" valign="bottom"><label>
                                            <span class="Style3">NB heures&#58;</span> 
                                            <input name="textfield" type="text" size="5" maxlength="5" />
                                        </label></td>
                                      </tr>
                                    </table>
                                    <table width="452" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <th height="39" scope="col">
    									<span class="Style3">Derni&egrave;re modification le  &#58;</span>
                                        <input name="datefiche" type="text" id="datefiche" value="Automatique" 
    									size="12" maxlength="12" /></th>
                                      </tr>
                                      <tr>
                                        <th width="452" scope="col"><div align="center"><span class="Style3">par &#58;
                                            </span>
                                          <input name="logincreafiche" type="text" id="logincreafiche" 
    									  value="Automatique" size="12" 
    										maxlength="12" />
                                            <img src="images/mail13.gif" alt="ezfz" width="32" height="32" 
    										onclick="return emailfiche&#40;&#41;"/></div></th>
                                      </tr>
                                    </table>
                                    <table width="452" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td width="455" height="239" align="center" valign="top"><label><br />
                                          <span class="entetelarge">Descriptif</span> <br />
                                          <br />
                                          <textarea name="textarea" cols="50" rows="12" id="textarea"></textarea>
                                        </label></td>
                                      </tr>
                                    </table>
                                    <table width="452" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td width="452" align="center" valign="top"><label></label>
                                          <span class="entetelarge"><br />
                                          R&eacute;solution</span><br />
                                          <br />
                                        <textarea name="textarea2" cols="50" rows="12" 
    									id="textarea2"></textarea></td>
                                      </tr>
                                    </table>
                                    <table width="453" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td width="453" height="48" align="center" valign="bottom">
    									<u>Fichier joint &#58;</u>
                                        <input name="fichiers" type="file" id="fichiers" size="24" 
    									maxlength="30" /></td> 
                                      </tr>
                                    </table>
                                    <table width="452" border="0" cellspacing="0" cellpadding="0">
     
                                      <tr>
                                        <td width="449" height="45" align="center" valign="bottom">
    									<img src="images/barrehnoir.gif" alt="a" width="237" height="17" /></td>
                                      </tr>
                                    </table>
                                    <table width="452" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td height="44" align="center" valign="bottom">
    									<span class="Gras">Sauvegarder &#58;</span>
                                          <input name="Enregistrer" type="button" class="bouton" id="Enregistrer" 
    									  value="Enregistrer" onclick="gopage&#40;'traitementfiche.php'&#41;"/></td>
                                      </tr>
                                      <tr>
                                        <td width="447" height="44" align="center" valign="bottom">
    									<label><span class="Gras">Supprimer cette fiche &#58;</span>
                                          <input name="supprimer" type="button" id="supprimer" value="Supprimer" 
    									  onclick="gopage&#40;'supprimerfiche.php'&#41;" />
                                        </label></td>
                                      </tr>
                                    </table>
                                    <table width="452" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td width="446" height="45" align="center" valign="bottom">
    									<img src="images/barrehnoir.gif" alt="a" width="237" height="17" /></td>
                                      </tr>
                                    </table>
                                    <table width="452" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <th width="447" height="38" align="center" valign="bottom" scope="col">
    									<em>Liste des fichiers joints &#58;</em></th>
                                      </tr>
                                      <tr>
                                        <th align="center" valign="bottom" scope="row">
    									<select name="select" id="select">
                                          </select>
                                          <input name="bt_fichiers" type="button" class="bouton" id="bt_fichiers" 
    									  value="Ouvrir" onclick="gopage&#40;''&#41;"/>
    									  <a href="index.php">Retour &agrave; l'accueil</a></th>
                                      </tr>
                                  </table></td>
                                  <td width="194" align="left" valign="top">
    							  <table width="190" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <th scope="col">&nbsp;</th>
                                        <th align="center" valign="bottom" scope="col">
    									<img src="images/saisieimg.jpg" alt="f" width="84" height="45" /></th>
                                      </tr>
                                      <tr>
                                        <th width="10" height="35" scope="col">&nbsp;</th>
                                        <th width="163" align="center" valign="bottom" scope="col"> -MIS</th>
                                      </tr>
                                      <tr>
                                        <th height="53" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom">
    									<input type="radio" name="btr" value="AP" checked="checked"/>
                                          AP</td>
                                      </tr>
                                      <tr>
                                        <th height="47" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><input type="radio" name="btr" value="GL" />
                                          GL</td>
                                      </tr>
                                      <tr>
                                        <th height="48" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><input type="radio" name="btr" value="AR" />
                                          AR</td>
                                      </tr>
                                      <tr>
                                        <th height="54" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><input type="radio" name="btr" value="FA" />
                                          FA</td>
                                      </tr>
                                      <tr>
                                        <th height="49" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><input type="radio" name="btr" value="PO" />
                                          PO</td>
                                      </tr>
                                      <tr>
                                        <th height="51" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><input type="radio" name="btr" value="EIP" />
                                          EIP</td>
                                      </tr>
                                      <tr>
                                        <th height="47" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><input type="radio" name="btr" value="CM" />
                                          CM</td>
                                      </tr>
                                      <tr>
                                        <th height="40" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><input type="radio" name="btr" value="OFA" />
                                          OFA</td>
                                      </tr>
                                      <tr>
                                        <th height="22" scope="row">&nbsp;</th>
                                        <td>&nbsp;</td>
                                      </tr>
                                    </table>
                                    <table width="190" height="316" border="0" cellpadding="0" cellspacing="0">
                                      <tr>
                                        <th width="10" scope="col">&nbsp;</th>
                                        <th width="181" align="center" valign="bottom" scope="col">-REDLIFT</th>
                                      </tr>
                                      <tr>
                                        <th height="51" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><span class="Titregrand">
                                          <input type="radio" name="btr" value="SPSS" />
                                          </span>SPSS</td>
                                      </tr>
                                      <tr>
                                        <th height="48" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom">
    									<input type="radio" name="btr" value="CLEMENTINE" />
                                          CLEMENTINE</td>
                                      </tr>
                                      <tr>
                                        <th height="48" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><input type="radio" name="btr" value="BDD" />
                                          BDD</td>
                                      </tr>
                                      <tr>
                                        <th height="43" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom"><span class="Gras">
                                          <input type="radio" name="btr" value="FORMATION" />
                                          </span>FORMATION</td>
                                      </tr>
                                      <tr>
                                        <th height="46" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom">
    									<input type="radio" name="btr" value="TRUCS ET ASTUCES" />
                                          TRUCS ET ASTUCES</td>
                                      </tr>
                                      <tr>
                                        <th height="46" scope="row">&nbsp;</th>
                                        <td align="left" valign="bottom">
    									<input type="radio" name="btr" value="AUTRES" />
                                          AUTRES</td>
                                      </tr>
                                  </table></td>
                                </tr>
                              </table></th>
                            <th width="64" scope="col">&nbsp;</th>
                          </tr>
                        </table>
                      </form>
                    <br /></th>
                  </tr>
                </table>
              </th>
            </tr>
          </table></th>
      </tr>
    </table>
    </body>
    </html>

  11. #31
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    lorsque tu cliques sur le bouton ok de ton formulaire de recherche, tu appelles gopage qui modifie et soumet le form2. Or ce form2 ne contient pas le champ textfieldsearch puisque ce dernier est dans le form1...

  12. #32
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 295
    Points : 87
    Points
    87
    Par défaut
    je comprend pas le bouton "ok" est donc:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <input name="bt_search" type="button" class="bouton" id="bt_search" value="ok" onclick="gopage&#40;'traitementsearch.php'&#41;"/>
    est soumis a traitementsearch.php
    Et est dans le form 1
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <form id="form1" name="form1" form="form" method="post" action="" onsubmit="return testsubmit&#40;&#41;">
    testsubmit() est bien lié a form1 :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <script language="JavaScript" type="text/javascript"> 
    function testsubmit&#40;&#41;
    	&#123;
        if &#40;document.form1.action==""&#41; return false; 
    return true;
    	&#125; 
    function gopage&#40;page&#41; 
    	&#123;
    document.form1.action = page; 
    document.form1.submit&#40;&#41;;
    	&#125; 
    </script>
    J'ai mal compris, on s est mal compris, ou j'ai fait 1 bétise?

  13. #33
    Expert éminent Avatar de Mr N.
    Profil pro
    Inscrit en
    Septembre 2004
    Messages
    5 418
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2004
    Messages : 5 418
    Points : 6 449
    Points
    6 449
    Par défaut
    Tu as deux définitions de gopage(), la deuxième écrasant la première.

  14. #34
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 295
    Points : 87
    Points
    87
    Par défaut
    quelqu'un a une solution alors car moi je ne sais pas du tout
    oups je suis bete j vai ajouté 2 au nom de la fonction

  15. #35
    Membre régulier
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    295
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2006
    Messages : 295
    Points : 87
    Points
    87
    Par défaut
    c est bon merci car maintenant il m'affiche une erreur de la page, donc c est une autre histoire qui commence

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Warning&#58; Wrong parameter count for mysql_db_query&#40;&#41; in C&#58;\wamp\www\rbdc\traitementsearch.php on line 42
    La requête SQL executée est &#58; select * from fiches where 1

+ Répondre à la discussion
Cette discussion est résolue.
Page 2 sur 2 PremièrePremière 12

Discussions similaires

  1. Réponses: 1
    Dernier message: 04/10/2006, 20h49
  2. [PHP][XSLT] problème caractères accentués
    Par beho dans le forum XSL/XSLT/XPATH
    Réponses: 11
    Dernier message: 29/05/2006, 10h29
  3. [PHP-JS] Problème de variable PHP dans un script JS
    Par soad029 dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 08/08/2005, 23h17
  4. [PHP - MSSQL] Problème d'upload / binaire
    Par noiserie dans le forum MS SQL Server
    Réponses: 12
    Dernier message: 25/07/2005, 19h03
  5. [Class/PHP/Postgres] Problème de modélisation...
    Par k-reen dans le forum PostgreSQL
    Réponses: 4
    Dernier message: 27/02/2003, 09h49

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