PDA

View Full Version : Mouseover conditional submenucontent



GuestDev
10-26-2009, 03:24 AM
1) Script Title: Mouseover Tabs Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/mouseovertabs.htm

3) Describe problem: I was going over the example for mouseover menu. I have couple of questions regarding configuring submenu.

<div id="mysubmenuarea" class="tabsmenucontentclass">

<!--1st link within submenu container should point to the external submenu contents file-->
<a href="submenucontents.htm" style="visibility:hidden">Sub Menu contents</a>

</div>

1) Can't we put the div section here in the same file instead of calling external files submenucontents.htm

2) If I need to add submenu based on certain conditions then .htm file will not be helpful.

<xsl:if test="condition">
<li>
<a href="#">submenuname</a>
</li>
</xsl:if>


Please let me know if someone guide me here.

ddadmin
10-27-2009, 08:57 AM
Hmm there's no quick way to do 1) unfortunately. Even if the script were modified so both the top level menu and its sub contents are contained in an external file, you still need to define an empty DIV on the target page in which the entire menu contents is added to then, as the script does not know where on the page you want the menu otherwise.

For 2), the only way would be to dynamically generate submenucontents.htm on the server end based on the desired conditions. The final HTML within this file would then reflect the final output you want for your sub menu. How exactly to do this really depends on what server side technologies your server supports and your knowledge of them.