Recent Questions Jquery Treeview Return To Original State
Q: May I can use PHP code in menu items of my dhtml website navigation menu?
A: You may generate a menu from a database or XML using any server-side script, e.g., PHP, ASP, VB, etc.
However, these scripts don't work inside of Javascript .js files, so, you should move parameters of a menu from a .js file into an html-page, e.g.:
<!-- JavaScript Tree Menu -->
<noscript><a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a></noscript>
<script type="text/javascript"> var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<!-- (c) 2006, http://deluxe-menu.com -->
<script type="text/javascript" language="JavaScript1.2">
// and describe parameters of a menu
var parameter1=value1;
var parameter2=value2;
etc.
var menuItems = [
// here you generate items using server-side scripts (php, asp, vb, etc.)
];
</script>
The example of the menu working with PHP/MYSQL you can find here:
http://deluxe-menu.com/rq-loading-bar-MySQL-support.html
Q: One other issue I am having if you don't mind helping. On my web site when I run the menu I get an Errors on page message with the following
Line: 16
Char: 18132
Error: Access is denied.
Code: 0
URL: http://www.site.id.au/left_frame.htm
When I run the site from my local PC with the menu, I don't get this error?
Could you possibly suggest why? I can't find anything on your site.
A: Try to check all you paths.
original setting:
var tmenuBackImage="";
var titemBackImage=["",""];
changed to:
var tmenuBackImage="images/blank.gif";
var titemBackImage=["images/blank.gif","images/blank.gif"];
Try to specify units in "px".
var tmenuWidth = "180px";
It's necessary to specify exact value for Mozilla browsers. It helpsto position menus correctly.
You should set this parameter:
var tmenuHeight = "auto";
Now you have such parameters in the menu:
["||24","C:/Documents and Settings/Paul/My Documents/My Web Sites/site.id.au/guide/24.htm", , , , , "main_frame", , , , , ],
["||30 Days","C:/Documents and Settings/Paul/My Documents/My Web Sites/site.id.au/guide/30days.htm", , , , , "main_frame", , , , , ], ["||Battlestar Galactica","C:/Documents and Settings/Paul/My Documents/My Web Sites/site.id.au/guide/battlestarg.htm", , , , , "main_frame", , , , , ],
["||Blade","C:/Documents and Settings/Paul/My Documents/My Web Sites/site.id.au/guide/blade.htm", , , , , "main_frame", , , , , ],
["||Eureka","C:/Documents and Settings/Paul/My Documents/My Web Sites/site.id.au/guide/eureka.htm", , , , , "main_frame", , , , , ],
["||I Pity the Fool","C:/Documents and Settings/Paul/My Documents/My Web Sites/site.id.au/guide/ipitythefool.htm", , , , , "main_frame", , , , , ],
You cannot use local paths on your website.
Please, correct it. <
br>You should write for example: ["||24","site.id.au/guide/24.htm", , , , , "main_frame", , , , , ],
["||30 Days","site.id.au/guide/30days.htm", , , , , "main_frame", , , , , ],
["||Battlestar Galactica","site.id.au/guide/battlestarg.htm", , , , , "main_frame", , , , , ],
Try to use also the attached engine .js files on your server.
Q: I use Namo WebEditor 2006 to edit our site.
I used your program to create a drop down menu but when I try to paste the script into my editor I don't get the menu. I have read your instructions and followed them step by step several times but I have had no success. Can you please assist me.
A: JavaScript Tree Menu wasn't developed as Namo WebEditor 2006/Dreamweaver/Frontpage extension,
BUT you can use it as standard Javascript files. To install the menuinto your html page:
1. open the page in Namo WebEditor 2006/Dreamweaver/Frontpage
2. open html source code of the page
3. add several rows of code (<script> tags), For info see:
http://deluxe-menu.com/installation-info.html
That's all.To create and configure your menus use Deluxe Tuner application(included into the trial package):http://deluxe-menu.com/deluxe-tuner-info.html
Q: How would I use the submenu feature to display itself only if a person is logged in. such as if a person logged in then the member area would expand, else it would always stay closed with only the login username section showing?
A: Unfortunately it is not possible. You can only add items depending onthe logged user.
You should use API functions:
see more info:
http://deluxe-menu.com/functions-info.html
For example, you can use:
function dtreet_ext_insertItem (menuInd, parentItemID, itemInd, itemParams)
function dtreet_ext_deleteItem (menuInd, itemID)
function dtreet_ext_showItem (itemID, visibility)
function dtreet_ext_expandItem (itemID, expand)