Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:34
I can't delete the tab in example
Poster: Northtiger
Dated: Saturday June 2 2007 - 14:49:35 BST
Hello
When I am trying to delete the tab that is used in exampe menu script does not work properly. I have changed only the index file.
Here is my index.html:
<html>
<head>
<title>Milonic DHTML/JavaScript Menu Sample Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
BODY{
FONT-FAMILY:verdana;
font-size:12px;
background-color:#FFFFFF;
}
.backG {
FONT-FAMILY:verdana;
background-color:#93c39b;
color:#ffffff;
border-bottom:#538c4d 2px solid;
font-size:12px;
}
td.form1
{
FONT-FAMILY:verdana;
background:#eaeaea;
font-size:12px;
}
</style>
</head>
<body>
<!--
Milonic DHTML Website Navigation Menu Version 5.0+
Copyright 2006 (c) Milonic Solutions Limited (UK). All Rights Reserved.
Please visit http://www.milonic.com/ for more information.
Although this software may have been freely downloaded, you must obtain a license before using it in any production environment.
The free use of this menu is only available for Non-Profit, Educational & Personal Web Sites who have obtained a license to use.
Free, Commercial and Corporate Licenses are available from our website.
You also need to include a link back to http://www.milonic.com/ if you use the free license.
All Copyright notices MUST remain in place at ALL times.
This includes the first three lines of this notice on every page that uses the menu.
If you cannot comply with all of the above requirements, please contact us to arrange a license waiver.
-->
<!-- ***** This is the section of code you need to paste into your web pages ***** -->
<noscript><a href="http://www.milonic.com/">DHTML Menu By Milonic JavaScript</a></noscript>
<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript" src="mmenudom.js"></script>
<!-- The next file contains your menu data, links and menu structure etc -->
<script type="text/javascript" src="menu_data.js"></script>
<!-- **** JavaScript Menu HTML Code -->
<script>
function item_on()
{
//getParentItemByItem=$f;
//getMenuByItem=$d;
getMenuByItem
itemid=_itemRef
menuid=_mi[_itemRef][0]
document.forms.sampf.mir.value=itemid
document.forms.sampf.mr.value=menuid
document.forms.sampf.mt.value=_mi[_itemRef][1]
document.forms.sampf.mn.value=_m[menuid][1]
parentmenuitem=getParentItemByItem(itemid);
document.forms.sampf.pmi.value=parentmenuitem;
if(parentmenuitem>-1)document.forms.sampf.pm.value=_m[getMenuByItem(itemid)][1]
}
function item_off()
{
document.forms.sampf.mir.value=""
document.forms.sampf.mr.value=""
document.forms.sampf.mt.value=""
document.forms.sampf.mn.value=""
document.forms.sampf.pmi.value=""
document.forms.sampf.pm.value=""
}
</script>
<table cellSpacing=0 cellPadding=13 border=0 style="border:1px solid #aaaaaa">
<tr>
<td class=backG align=center>
<b>Activating Functions on Mouseover</td>
</tr>
<tr>
<td class=form1 align=right>
<form name=sampf id=sampf>
Menu Item Reference: <input type=text id="mir" name="mir" size="20"><br>
Menu Item Text: <input type=text id="mt" name="mt" size="20"><br>
Menu Reference: <input type=text id="mr" name="mr" size="20"><br>
Menu Name: <input type=text id="mn" name="mn" size="20"><br>
Parent Menu Item: <input type=text id="pmi" name="pmi" size="20"><br>
Parent Menu: <input type=text id="pm" name="pm" size="20"><br>
</form>
</tr>
<tr>
<td class=form1>
The <b><i></i></b> sample shows how you can include custom JavaScript functions that get activated
onMouseover, onMouseOut and onClick.
<P>In order to have a function activated onMouseOver or onMouseOut you will need
to include your function name within the aI text string of a menu item as in the
following sample:.
<P><I><B><FONT size=2>aI("text=Sample Item 1;onfunction=yourfunction('param1','param2')");</FONT></B></I><P>off function is the same but you change the <I><B>onfunction</B></I> to
<I><B>offfunction</B></I> in the above aI text string. In order to have both onMouseOver and onMouseOut your menu item must look like this:
<P><I><B><FONT size=2>aI("text=Sample Item 1;onfunction=youronfunction('param1','param2');offfunction=youronfunction('param3');");</FONT></B></I><P>If you need to have your menu activate a function onClick you would use a
menuitem like this: <br>
<br>
<I><B><FONT size=2>aI("text=Sample Item 1;url=javascript:alert('Displaying
an alert box');");</FONT></B></I><P>You can also include onMouseOut and onMouseOver functions to the above
sample</P>
</td>
</tr>
</table>
<a href=http://www.milonic.com/>DHTML Menu By Milonic JavaScript</a>
</body>
</html>
Please tell me what am doing wrong