stedem Posted February 10, 2010 Share Posted February 10, 2010 I have an productview for a site. I want when people click on a subject the three collapses. I can list all of my items but they doesn't collapse. CREATE TABLE IF NOT EXISTS `artikel_menu` ( `id` int(10) unsigned NOT NULL auto_increment, `hide` varchar(9) NOT NULL default 'no', `artikel_naam_nl` varchar(255) NOT NULL, `artikel_naam_fr` varchar(255) NOT NULL, `artikel_type` varchar(99) NOT NULL default 'file', `artikel_afbeelding` varchar(99) NOT NULL default 'geen.jpg', `artikel_samenvatting_nl` text NOT NULL, `artikel_samenvatting_fr` text NOT NULL, `hoofdgroep_id` int(11) default NULL, `groep_id` int(11) default '0', `subgroep_id` int(11) default '0', `minigroep_id` varchar(99) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=255 ; <?php $select_hoofdgroep = mysql_query("SELECT * FROM artikel_menu WHERE hoofdgroep_id = '0' AND groep_id = '0' AND subgroep_id = '0' AND minigroep_id = '0' AND hide = 'no' ORDER BY artikel_naam_$taal ASC"); while ($fetch_hoofdgroep = mysql_fetch_assoc($select_hoofdgroep)) { if ($fetch_hoofdgroep['artikel_type'] == "file"){ // } else { echo '<li><table border="0"><tr><td width="0"></td><td valign="top"><img src="files/jquery.treeview/images/plus.png" /></td><td valign="top"> <a href="page.php?hg='.$fetch_hoofdgroep['id'].'&gr='.$fetch_hoofdgroep['groep_id'].'&sb='.$fetch_hoofdgroep['subgroep_id'].'&pid='.$fetch_hoofdgroep['id'].'&slct=gr&cnt=n&nav=prod"> '.$fetch_hoofdgroep['artikel_naam'.'_'.$taal].'</a></td></tr></table>'; }//////// $select_groep = mysql_query("SELECT * FROM artikel_menu WHERE hoofdgroep_id = " .$fetch_hoofdgroep['id'] . " AND groep_id = '0' AND subgroep_id = '0' AND minigroep_id = '0' ORDER BY artikel_naam_$taal ASC"); while ($fetch_groep = mysql_fetch_assoc($select_groep)) { if ($fetch_groep['artikel_type'] == "file"){ echo '<li><table border="0"><tr><td width="15"></td><td valign="top"><img src="files/jquery.treeview/images/plus.png" /></td><td valign="top"> <a href="page.php?hg='.$fetch_groep['hoofdgroep_id'].'&gr='.$fetch_groep['groep_id'].'&sb='.$fetch_groep['subgroep_id'].'&pid='.$fetch_groep['id'].'&cnt=y&nav=prod"> '.$fetch_groep['artikel_naam'.'_'.$taal].'</a></td></tr></table>'; } else { echo '<li><table border="0"><tr><td width="15"></td><td valign="top"><img src="files/jquery.treeview/images/plus.png" /></td><td valign="top"> <a href="page.php?hg='.$fetch_groep['hoofdgroep_id'].'&gr='.$fetch_groep['id'].'&sb='.$fetch_groep['subgroep_id'].'&pid='.$fetch_groep['id'].'&slct=sb&cnt=n&nav=prod"> '.$fetch_groep['artikel_naam'.'_'.$taal].'</a></td></tr></table>'; }//////// $select_subgroep = mysql_query("SELECT * FROM artikel_menu WHERE hoofdgroep_id = " .$fetch_hoofdgroep['id'] . " AND groep_id = " . $fetch_groep['id'] . " AND subgroep_id = '0' AND minigroep_id = '0' ORDER BY artikel_naam_$taal ASC"); while ($fetch_subgroep = mysql_fetch_assoc($select_subgroep)) { if ($fetch_subgroep['artikel_type'] == "file"){ echo '<li><table border="0"><tr><td width="30"></td><td valign="top"><img src="files/jquery.treeview/images/plus.png" /></td><td valign="top"> <a href="page.php?hg='.$fetch_subgroep['hoofdgroep_id'].'&gr='.$fetch_subgroep['id'].'&sb='.$fetch_subgroep['subgroep_id'].'&pid='.$fetch_subgroep['id'].'&cnt=y&nav=prod"> '.$fetch_subgroep['artikel_naam'.'_'.$taal].'</a></td></tr></table>'; } else { echo '<li><table border="0"><tr><td width="30"></td><td valign="top"><img src="files/jquery.treeview/images/plus.png" /></td><td valign="top"> <a href="page.php?hg='.$fetch_subgroep['hoofdgroep_id'].'&gr='.$fetch_subgroep['groep_id'].'&sb='.$fetch_subgroep['id'].'&pid='.$fetch_subgroep['id'].'&slct=sb&cnt=n&nav=prod"> '.$fetch_subgroep['artikel_naam'.'_'.$taal].'</a></td></tr></table>'; } //////// $select_minigroep = mysql_query("SELECT * FROM artikel_menu WHERE hoofdgroep_id = " .$fetch_hoofdgroep['id'] . " AND subgroep_id = " . $fetch_subgroep['id'] . " AND minigroep_id = '0' ORDER BY artikel_naam_$taal ASC"); while ($fetch_minigroep = mysql_fetch_assoc($select_minigroep)) { if ($fetch_minigroep['artikel_type'] == "file"){ echo '<li><table border="0"><tr><td width="45"></td><td valign="top"><img src="files/jquery.treeview/images/plus.png" /></td><td valign="top"> <a href="page.php?hg='.$fetch_minigroep['hoofdgroep_id'].'&gr='.$fetch_minigroep['groep_id'].'&sb='.$fetch_minigroep['subgroep_id'].'&pid='.$fetch_minigroep['id']. '&cnt=y&nav=prod">'.$fetch_minigroep['artikel_naam'.'_'.$taal].'</a></td></tr></table>'; } } ////////} } ////////} } ////////} } ?> Link to comment https://forums.phpfreaks.com/topic/191584-product-view-tree/ Share on other sites More sharing options...
freakstyle Posted February 10, 2010 Share Posted February 10, 2010 looks like a jquery question. giving your html would have been more helpful then the script that we can't run. Link to comment https://forums.phpfreaks.com/topic/191584-product-view-tree/#findComment-1010402 Share on other sites More sharing options...
stedem Posted February 10, 2010 Author Share Posted February 10, 2010 looks like a jquery question. giving your html would have been more helpful then the script that we can't run. Hi, sorry. I work with a lot of includes for my site, this is the "navigation" part of the site, all the other stuff is just content and useless for this question. I think it is something with my fetch that isn't correct? Link to comment https://forums.phpfreaks.com/topic/191584-product-view-tree/#findComment-1010407 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.