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 :

afficher image cliquable selon recherche


Sujet :

Langage PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Homme Profil pro
    Développeur du Dimanche
    Inscrit en
    Juillet 2014
    Messages
    147
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur du Dimanche
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juillet 2014
    Messages : 147
    Par défaut afficher image cliquable selon recherche
    Bonjour,

    J'ai un formulaire de recherche <form>.Nom : Sélection_006.png
Affichages : 194
Taille : 15,2 Ko
    Si le formulaire est rempli je voudrais afficher au résultat un bouton sous forme de flèche cliquable avec les propriétés du bouton lancer votre recherche.
    Je m'explique il y a une bannière premium pour faire défiler 5 photos selon le choix de la recherche, si l'on sélectionne 'toutes les régions' par exemple et que l'on clique sur lancer votre recherche les 5 premières photos s'affichent, si l'on re-clique sur le bouton lancer votre recherche les 5 photos suivantes s'affichent et ainsi de suite. En fait je voudrais que le bouton sous forme de flèche ait les même propriétés que celle du bouton lancer votre recherche. Est-ce possible ?
    Merci da'avance.

    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
     
    <?php	
    }
     
    /// ----- MENU DE RECHERCHE --------///
     
    function right_pub($reg, $dep, $cat, $mots_search, $code_pos)
    {
    	global $language, $param_gen, $cache_regions, $cache_departements, $cache_categories, $cache_publicites, $cache_param_champs;
     
    ?>
     
    <div id="corps_recherche">
     
    <form method="get" action="ann_search.php">
     
    	<div id="top_menu_recherche"></div>
     
    	<div id="middle_menu_recherche">
     
    		<input type="text" class="input_recherche" name="keywords" onfocus="InputCon(this, '<?php echo $language['value_recherche']; ?>')" onblur="InputCon(this, '<?php echo $language['value_recherche']; ?>')" value="<?php if(!empty($mots_search)) echo $mots_search; elseif(!empty($_GET['keywords'])) echo htmlspecialchars($_GET['keywords']); else echo $language['value_recherche']; ?>" />
     
    		<?php
    		if($cache_param_champs['act_code_pos'] == 1)
    		{
    		?>
    		<input type="text" class="input_recherche" name="zip_code" onfocus="InputCon(this, '<?php echo $language['value_code_postal']; ?>')" onblur="InputCon(this, '<?php echo $language['value_code_postal']; ?>')" value="<?php if(!empty($code_pos)) echo $code_pos; elseif(!empty($_GET['zip_code'])) echo htmlspecialchars($_GET['zip_code']); else echo $language['value_code_postal']; ?>" />
    		<?php
    		}
    		?>
     
     
    		<?php 
     
    			display_search_regions($reg, $cache_regions); //Afficher les régions 
     
    			echo '<div id="get_departements">';
     
    			$aff = 0;
     
    			foreach($cache_departements as $v)
    			{
    				if($v['id_reg'] == $reg)
    				$aff = 1;
    			}
     
    			if($aff == 1)
    			{
    				if(!empty($reg)) display_search_departements($dep, $reg, $cache_departements);
    			}
     
    			echo '</div>';
     
    			display_search_categories($cat, $cache_categories); //Afficher les categories
     
    			echo '<div id="get_options">';
     
    			if(!empty($cat)) display_search_options($cat); 
     
    			echo '</div>';
     
    			?>
     
    			<div class="title_checkbox"><p class="p_recherche_unique"><img src="images/fleche_u.png" alt="" /><?php echo $language['uniquement']; ?></p></div>
     
    			<div id="left_checkbox_recherche">
     
    				<p class="p_checkbox_recherche">
    					<input type="checkbox" class="input_checkbox" id="titre" name="titre" value="1" onclick="turnImgCheck(this);" <?php if (!empty($_SESSION['old_titre'])) echo 'checked="checked"'; ?> />
    					<img <?php if (!empty($_SESSION['old_titre'])) echo 'src="images/check2.png"'; else echo 'src="images/check1.png"'; ?> id="img_check_titre" alt="" /> 
    					&nbsp;<label for="titre"><?php echo $language['checkbox_chercher_titre']; ?></label>
    				</p>
     
    				<p class="p_checkbox_recherche">
    					<input type="checkbox" class="input_checkbox" id="offres" name="offres" value="1" onclick="turnImgCheck(this);" <?php if (!empty($_SESSION['old_offres'])) echo 'checked="checked"'; ?> />
    					<img <?php if (!empty($_SESSION['old_offres'])) echo 'src="images/check2.png"'; else echo 'src="images/check1.png"'; ?> id="img_check_offres" alt="" /> 
    					&nbsp;<label for="offres"><?php echo $language['checkbox_chercher_offres']; ?></label>
    				</p>
     
    				<?php
    				if($param_gen['active_ech'] == 1)
    				{
    				?>
    					<p class="p_checkbox_recherche">
    						<input type="checkbox" class="input_checkbox" id="echanges" name="echanges" value="1" onclick="turnImgCheck(this);" <?php if (!empty($_SESSION['old_echanges'])) echo 'checked="checked"'; ?> />
    						<img <?php if (!empty($_SESSION['old_echanges'])) echo 'src="images/check2.png"'; else echo 'src="images/check1.png"'; ?> id="img_check_echanges" alt="" /> 
    						&nbsp;<label for="echanges"><?php echo $language['checkbox_chercher_echanges']; ?></label>
    					</p>
    				<?php
    				}
    				?>
     
    				<p class="p_checkbox_recherche">
    					<input type="checkbox" class="input_checkbox" id="photo" name="photo" value="1" onclick="turnImgCheck(this);" <?php if (!empty($_SESSION['old_photo'])) echo 'checked="checked"'; ?> />
    					<img <?php if (!empty($_SESSION['old_photo'])) echo 'src="images/check2.png"'; else echo 'src="images/check1.png"'; ?> id="img_check_photo" alt="" /> 
    					&nbsp;<label for="photo"><?php echo $language['checkbox_chercher_photo']; ?></label>
    				</p>
     
    			</div>
     
    			<div id="right_checkbox_recherche">
     
    				<p class="p_checkbox_recherche">
    					<input type="checkbox" class="input_checkbox" id="urgentes" name="urgentes" value="1" onclick="turnImgCheck(this);" <?php if (!empty($_SESSION['old_urgentes'])) echo 'checked="checked"'; ?> />
    					<img <?php if (!empty($_SESSION['old_urgentes'])) echo 'src="images/check2.png"'; else echo 'src="images/check1.png"'; ?> id="img_check_urgentes" alt="" /> 
    					&nbsp;<label for="urgentes"><?php echo $language['checkbox_chercher_urgent']; ?></label>
    				</p>
     
    				<p class="p_checkbox_recherche">
    					<input type="checkbox" class="input_checkbox" id="recherches" name="recherches" value="1" onclick="turnImgCheck(this);" <?php if (!empty($_SESSION['old_recherches'])) echo 'checked="checked"'; ?> />
    					<img <?php if (!empty($_SESSION['old_recherches'])) echo 'src="images/check2.png"'; else echo 'src="images/check1.png"'; ?> id="img_check_recherches" alt="" /> 
    					&nbsp;<label for="recherches"><?php echo $language['checkbox_chercher_recherches']; ?></label>
    				</p>
     
    				<?php
    				if($param_gen['active_don'] == 1)
    				{
    				?>
    					<p class="p_checkbox_recherche">
    						<input type="checkbox" class="input_checkbox" id="dons" name="dons" value="1" onclick="turnImgCheck(this);" <?php if (!empty($_SESSION['old_dons'])) echo 'checked="checked"'; ?> />
    						<img <?php if (!empty($_SESSION['old_dons'])) echo 'src="images/check2.png"'; else echo 'src="images/check1.png"'; ?> id="img_check_dons" alt="" /> 
    						&nbsp;<label for="dons"><?php echo $language['checkbox_chercher_dons']; ?></label>
    					</p>
    				<?php
    				}
    				?>
     
    				<p class="p_checkbox_recherche">
    					<input type="checkbox" class="input_checkbox" id="video" name="video" value="1" onclick="turnImgCheck(this);" <?php if (!empty($_SESSION['old_video'])) echo 'checked="checked"'; ?> />
    					<img <?php if (!empty($_SESSION['old_video'])) echo 'src="images/check2.png"'; else echo 'src="images/check1.png"'; ?> id="img_check_video" alt="" /> 
    					&nbsp;<label for="video"><?php echo $language['checkbox_chercher_video']; ?></label>
    				</p>
     
    			</div>
     
    			<input id="submit_recherche" type="image" src="images/bouton_search.png" value="submit_recherche" />
     
     
     
     
     
    ///////////////////////////////////AFFICHAGE DE LA FLECHE//////////////////////////////////////////////////////////////////////////////
     
     
    <?php
                if(isset($_GET['submit_recherche']))
                 {
                          echo'<div class="flecheslider"><input id="submit_recherche" value="submit_recherche" /></div>' ;
           }
    ?>
     
     
     
    	</div>
     
    	<div id="bottom_menu_recherche"></div>
     
    </form>

  2. #2
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    Il manque le "name" :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <input id="submit_recherche" name="submit_recherche" type="image" src="images/bouton_search.png" value="submit_recherche" />
     
    ///////////////////////////////////AFFICHAGE DE LA FLECHE//////////////////////////////////////////////////////////////////////////////
     
    <?php
                if(isset($_GET['submit_recherche']))
                 {
                          echo '<div class="flecheslider"><input id="submit_recherche" name="submit_recherche" type="image" src="images/fleches.png" value="submit_recherche" /></div>' ;
                 }
    ?>
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

  3. #3
    Membre confirmé
    Homme Profil pro
    Développeur du Dimanche
    Inscrit en
    Juillet 2014
    Messages
    147
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur du Dimanche
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juillet 2014
    Messages : 147
    Par défaut
    Bonjour,

    Merci pour ta réponse mais la flèche ne s'affiche pas pourtant j'ai bien :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    	<input id="submit_recherche" name="submit_recherche" type="image" src="images/bouton_search.png" value="submit_recherche" />
     
     
    <?php
                if(isset($_GET['submit_recherche']))
                 {
                          echo'<div class="flecheslider"><input id="submit_recherche" name="submit_recherche" type="image" src="images/fleches.png" value="submit_recherche" /></div>' ;
           }
    ?>

  4. #4
    Membre confirmé
    Homme Profil pro
    Développeur du Dimanche
    Inscrit en
    Juillet 2014
    Messages
    147
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur du Dimanche
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juillet 2014
    Messages : 147
    Par défaut
    Mille excuses en fait je n'avais pas vu la position de ma div, la flèche apparaît belle et bien.
    Encore Merci Sabotage

  5. #5
    Invité
    Invité(e)
    Par défaut
    Bonjour,
    je vois 2 fois :
    Or, un id DOIT être unique.

  6. #6
    Membre confirmé
    Homme Profil pro
    Développeur du Dimanche
    Inscrit en
    Juillet 2014
    Messages
    147
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur du Dimanche
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juillet 2014
    Messages : 147
    Par défaut
    Merci pour vos conseils.

    avec le code sabotage ci-dessus l'image s'affiche et fait défiler le bloc d'images.
    Bizzare

Discussions similaires

  1. Afficher une ville sur une image cliquable
    Par mario94 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 41
    Dernier message: 18/05/2012, 00h54
  2. [A-07] Afficher Image selon une case à cocher
    Par vinze60 dans le forum IHM
    Réponses: 10
    Dernier message: 21/10/2008, 10h11
  3. Réponses: 3
    Dernier message: 10/01/2008, 22h09
  4. [MNS] Afficher une image différente selon le statu
    Par Furius dans le forum Messagerie instantanée
    Réponses: 15
    Dernier message: 02/01/2006, 14h55

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