Recent Questions
Q: Can I use data from a SQL server using ASP for drop down menu code?
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.:
<!-- Deluxe 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.)
];
Unfortunately we don't have examples with ASP and SQL.
The example of the menu working with PHP/MYSQL you can find here:
http://deluxe-menu.com/rq-loading-bar-MySQL-support.html
Q: Is it correct that in javascript treeview menu you can specify your target as a different frame?
A: Yes, you can specify frame name as the target in Deluxe Tree:
var titemTarget="frame";
Q: I am rewriting my homepage in CSS but now I have another problem with the DeLuxe menu.
The javascript top menu is well positioned on the page but the submenus are not.
The submenus are not positioned aside the javascript top menu but lower and far to much to the right.
I changed the variables
var posX = 100;
var posY = 100;
var absolutePos = 1;
var topDX = 0;
var topDY = 0;
var DX = -3;
var DY = 0;
var subMenuAlign = "left";
var subMenuVAlign = "top";
Sometimes when I change the variables the submenus are well positioned and then, after enlarging the IE-window, they are not.
What can I do?
A: It is possible that you have some problems with your css styles.
See, the problem is that the javascript top menu can't get css properties of the object if they are described in separate .css block (or file).
In other words, you can't get the value of "POSITION: absolute" attribute of the object if the object doesn't have this property within inline style (style="POSITION:absolute;"). To get the value you should move .css style into style="" attribute.
Please, try to add your
css file -> inline css, for example:
You should add style="POSITION: absolute;"
to the
<div id="block">
Q: Thanks for swift reply, however:
Tried the dmenu.js (only one we use) at our trial site and get the error :
Line 13
Invalid argument
- as you know this js file is obfuscated to one line, so using a debugger does not apply.
A: See the attached example. I've upgraded your javascript layer menu to Deluxe Menu v3.0.
use data file and engine files from the attachment.
You had several errors in the structure of menuItems.
It is not correct to write
["| Contact us","http://www.imarex.com/home/contact_us","","","","","8","","",],
["||| Energy team","http://www.imarex.com/home/contact_us/energy_team","","","","","8","","",],
You should write:
["| Contact us","http://www.imarex.com/home/contact_us","","","","","8","","",],
["|| Energy team","http://www.imarex.com/home/contact_us/energy_team","","","","","8","","",],