[AJAX] Fenêtre modale ajax
bonjour,
j'ai fait une page produit et les gens peuvent choisir un nombre d'article désirer et clic après sur le bouton commande.
Ensuite une fenêtre modale jquery s'affiche ou il peuvent choisir de commander ou de continuer les achats.
petit problème pour récupérer les nombre d'article commander avant que ce soit avec get ou post rien ne s'affiche.
Code:
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
| <?php
$body.='<div>Choisir votre quantite:
<select id="nb_article" name="nb_article">';
$stock = $Produits->getStockArticle();
$i=1;
for($i;$i<=$stock;$i++)
{
$body.='<option value="'.$i.'"> '. $i .' </option>';
}
$body.='</select>
</div>';
$body.='<div id="basic-modal">
<input type="hidden" name="ref" value="'.$idProduit.'" />
<input type="submit" name="Commander" value="Commander" class="basic"/>
</div>';
$body.='</form>';
if(isset($_POST['nb_article'])){
$body.='<!-- modal content -->
<div id="basic-modal-content">
<h3>Basic Modal Dialog</h3>
<p><a href="choix_commande.php?continuer_commande&ref='.$idProduit.'&nbr='.$_GET['nb_article'].'">Continuer la commande</a>
ou <a href="choix_commande.php?continuer_achat&ref='.$idProduit.'&ref='.$idProduit.'">Continuer mes achats</a></p>
</div>
<!-- preload the images -->
<div style="display:none">
<img src="../images/basic/x.png" alt="" />
</div>
';
}
?> |
merci.