Recent Questions
Q: In the drop down menu generator there's no option for turning the cursor into a hand. There's hourglass etc but no hand. Is there a way to make it a hand?
A: You should set the following parameter
var itemCursor="pointer";
Q: I created a custom error page for a site, but the menu would not display.
I found that this was due to the erroneous "current directory" in the bad link test, for a non-existent directory.
which is: level2/level3/
I changed the script code from:
<script type="text/javascript"> var dmWorkPath = "DMworkfiles/";</script>
<script type="text/javascript" src="DMworkfiles/dmenu.js"></script>
to:
<script type="text/javascript"> var dmWorkPath = "DMworkfiles/";</script>
<script type="text/javascript" src="/DMworkfiles/dmenu.js"></script>
adding the "/" before "DMworkfiles/dmenu.js" source reference allowed the .js file to be found in the root directory and the menu would display.
The problem is that the little menu "expansion" arrow .gif cannot be found in the "current working directory" of level2/level3/. just little "blanks" show.
I tried changing:
var dmWorkPath = "DMworkfiles/";
to:
var dmWorkPath = "/DMworkfiles/";
but that did not enable the display of the arrows.
I also had to prefix all of the links in the menu with a "/" to indicate the root directory because of the "current directory" for the bad page.
I hope I have explained the problem sufficiently.
What am I doing wrong or missing here?
A: You can use additional parameters to make menu paths absolute:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
These parameters allow to make images and links paths absolute.
For example:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
var menuItems = [
["text", "index.html", "icon1.gif", "icon2.gif"],
];
So, link path will be look so:
http://domain.com/pages/index.html
Images paths will be look so:
http://domain.com/images/icon1.gif
http://domain.com/images/icon2.gif
Please, try to use these parameters
Q: Can a menu item that expands the submenu items when selected also work as a link?
A: Actually you cannot use links for the top items in the XP Style.
But you can write:
["<a href='index.html' class='home'>Home</a>","", "", "", "", "Return to Index page", "", "0", "", ],
["<a href='http://www.domain.uk' class='home'>About Us</a>","", "", "", "", "", "", "0", "", ],
["|Introduction","http://www.domain.uk/introduction.htm", "", "", "", "", "", "", "", ],
And create styles
.home{
color: #FFFFFF;}
.home:hover{
color: #FFBEBE;}
But in that case the submenu and link open when you press "About Us" item. I think that it is not verygood behaviour. You can also try to specify target parameter
["<a href='index.html' class='home'>Home</a>","", "", "", "", "Return to Index page", "", "0", "", ],
["<a href='http://www.domain.uk' class='home' target="_blank">About Us</a>","", "", "", "", "", "", "0", "", ],
["|Introduction","http://www.domain.uk/introduction.htm", "", "", "", "", "", "", "", ],
Q: I've added a tab menu to a site but I want to know
how to get the active tab to stay a certain color in the html tabs menu
when you're on that tabs page.
A: Deluxe Tabs doesn't support API functions which can return theselected tab.
You can set "bselectedItem" and " var bselectedSmItem" parameters
based on your link before you call your data file.
For example, move " var bselectedItem" and " var bselectedSmItem" parameters
from your data file to your code.
<TD vAlign=top align=left>
/* Select Tab */
<script type="text/javascript" language="JavaScript1.2">
var bselectedItem=<?php echo $seltabs; ?>;
var bselectedSmItem=<?php echo $selsmtabs; ?>;
</script>
<SCRIPT src="data.js" type=text/javascript></SCRIPT>
</TD>
You should define seltabs and selsmtabs using server side script.
You can also set it on every page before you call data.js file, forexample:
<TD vAlign=top align=left>
/* Select Tab */
<script type="text/javascript" language="JavaScript1.2">
var bselectedItem=4;
var bselectedSmItem=3;
</script>
<SCRIPT src="data.js" type=text/javascript></SCRIPT>
</TD>