Skip to content
Snippets Groups Projects
Commit 2ddf1325 authored by ALGLAVE Ivan's avatar ALGLAVE Ivan
Browse files

debug_1

parent d753b5eb
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@
return null; // A FAIRE
}
if(!isset($_GET['element'])) {
// Si on ouvre la Hiérachie pour la première fois, on part de 'Aliment'
$aliment = 'Vin effervescent';
......@@ -46,6 +47,8 @@
// Sinon on récupère l'aliment en cours
$aliment = $_GET['element'];
}
echo '<script>alert('."'".$aliment."'".');</script>';
$sup_cat = get_super_categories($aliment);
$sous_cat = get_sous_categories($aliment);
......@@ -58,7 +61,7 @@
echo '<div class="category-view">';
echo '<h1> Super-catégories de '.$aliment.' </h1>';
foreach($sup_cat as $cat) {
echo '<li><button onclick="notifyParent('.$cat.');">'.$cat.'</button></li>';
echo '<li><button onclick="notifyParent('."'".$cat."'".');">'.$cat.'</button></li>';
}
echo '</div>';
}
......@@ -68,7 +71,7 @@
echo '<h1> Sous-catégories de '.$aliment.' </h1>';
foreach($sous_cat as $cat) {
//echo '<li><button onclick="notifyParent('.$cat.');">'.$cat.'</button></li>';
echo '<li><button onclick="alert('.$cat.');">'.$cat.'</button></li>';
echo '<li><button onclick="notifyParent('."'".$cat."'".');">'.$cat.'</button></li>';
}
echo '</div>';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment