I was thinking of using the bootstrap modal to select category and reorder a list of products.
From a dropdown, I have the list of categories to choose for reordering but using javascript to load the products after choosing the category, the modal window closes. Maybe I want to use the modals in a way that can't be done?
<div class="modal-body">
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="get" name="mdlfrmListProduct" id="frmListProduct">
<div class="tbl-cell tbl-cell-title col-md-5">
<select name="modalCategory" class="form-control" id="modalCategory" onChange="modalProduct();"
required />
<option value="">Select category</option>
<?php echo CategoryTree(); ?>
</select>
</div>
</form>
function modalProduct()
{
with (window.document.mdlfrmListProduct) {
if (modalCategory.selectedIndex == 0) {
window.location.href = 'index.php';
} else {
window.location.href = 'index.php?catId=' + modalCategory.options[modalCategory.selectedIndex].value;
}
}
}
</script>
</div>