Hi,
I was wondering if it's possible to create a dynamic dropdown menu from this code.
- if($rs->getNumRows() > 0){
-
$intProjectCount = 1;
-
$htmlOut ="<table width='100%' border='0' align='center' cellpadding='1' cellspacing='0'>";
-
foreach($rs->fetch() as $prs){
-
-
$htmlOut .="<tr><td class=\"projectkiri\" ><a href=\"/index.php?page=PROJECTS&id=".$prs['pr_ID']."\">".$prs[$strFieldName]."</a></td></tr>";
-
//$intProjectCount++;
-
}
-
$htmlOut .="</table>";
-
}else{
-
$htmlOut ="<table width='100%' border='0' align='center' cellpadding='1' cellspacing='0'>";
-
$htmlOut .="<tr>
-
<td class='projectkiri'>Belum ada proyek <br>untuk saat ini</td>
-
</tr>
-
</table>";
Basically, if I understood this correctly, this snippet of code
- $htmlOut .="<tr><td class=\"projectkiri\" ><a href=\"/index.php?page=PROJECTS&id=".$prs['pr_ID']."\">".$prs[$strFieldName]."</a></td></tr>";
makes sure the "projectkiri" (project-menu on the left of the page) is displayed. Meaning the different projects listed in the CMS. Now, as it's 5 projects, I want that as soon as you mousehover above the selected project, a sub-menu consisting of 4 different submenus to appear (We've already got the sub-pages incorporated, I just want a sub-menu for easier access).
So hover above project 1, the four sub-menus for project 1 appear, same for project 2 etc.. Is this actually possible? I tried it myself but somehow the dropdown menus didn't appear when you mouse-over'd but they were constantly there. Also when I used <ul> and <il> tags in the $htmlOut I kept getting a parse/syntax error everywhere.
Thanks in advance.