Javascript problème select onChange
Résolu/Fermé
f123b
f123b
- Messages postés
- 7
- Date d'inscription
- lundi 8 juin 2009
- Statut
- Membre
- Dernière intervention
- 5 septembre 2009
f123b
- Messages postés
- 7
- Date d'inscription
- lundi 8 juin 2009
- Statut
- Membre
- Dernière intervention
- 5 septembre 2009
A voir également:
- Javascript problème select onChange
- Javascript problème select onChange ✓ - Forum - Javascript
- Javascript select onchange ✓ - Forum - Astuces et Solutions
- [Javascript / jQuery] 2 onchange sur Select.. ✓ - Forum - Javascript
- [Javascript] liste déroulante onChange ✓ - Forum - Javascript
- Select + onchange + php ✓ - Forum - PHP
2 réponses
CaPiT
1 sept. 2009 à 09:53
- Messages postés
- 609
- Date d'inscription
- lundi 7 janvier 2008
- Statut
- Membre
- Dernière intervention
- 21 avril 2010
1 sept. 2009 à 09:53
Bonjour,
j'aurais fait un truc du genre (je n'ai pas testé le code il est peut-être à modifier):
j'aurais fait un truc du genre (je n'ai pas testé le code il est peut-être à modifier):
<form method="GET" name="form" action="product.php"> <select name="plusmoins" onChange="this.form.submit();"> <option <?php if(!$_GET["plusmoins"]){echo selected;} ?> value="default_ranking">defaut</option> <option <?php if($_GET["plusmoins"]=="totalprice_ascending"){echo selected;} ?> value="totalprice_ascending">prix croissant</option> <option <?php if(($_GET["plusmoins"]=="totalprice_ascending"){echo selected;} ?> value="totalprice_descending">prix decroissant</option> </select> </form>
f123b
5 sept. 2009 à 16:11
- Messages postés
- 7
- Date d'inscription
- lundi 8 juin 2009
- Statut
- Membre
- Dernière intervention
- 5 septembre 2009
5 sept. 2009 à 16:11
Merci beaucoup, ca marche très bien.