Recent Questions
Q: Can I use data from a SQL server using ASP for the dhtml xml 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.:
<!-- 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.)
];
</script>
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: Using data-visa-5.js
Trying to get the menu to start collapsed rather than fully expanded.
Thought it was the var texpanded=0 setting but doesn't seem to have any effect.
A: See, when you set + sign before item's text that is mean that thisitem will be expanded.
Now you have:
["+ Home","index.php","","","Home","","","1",""],
["+ Current Weather","","","","Current Weather","","","1",""],
["|Hourly Forecast","index.php?forecast=avnmos&zipcode=55744&oc=mosview_option|forecast","","","Hourly Forecast",,,],
["|Warnings/Advisories","index.php?forecast=warnings&zipcode=55744","","","Warnings/Advisories",,,],
["|Special Weather Alerts","index.php?config=&forecast=special&zipcode=55744","","","Special Weather Alerts",,,],
["|Live Weather","javascript:open('../../wxflash/index.htm','_blank')","","","Live Weather",,,],
["+ WeatherForum","/forum/index.php","","","Home","","","1",""],
["+ Weather Cams","","","","Weather Cams","","","1",""],
["|RapidsCam East","javascript:open_win('../../webcam/eastcam.asp',335,270,0,0,0,0,0,0,0,0,2,'cameast');","","","RapidsCam East",,,],
["|RapidsCam West","javascript:open_win('../../webcam/westcam.asp',367,270,0,0,0,0,0,0,0,0,3,'camwest');","","","RapidsCam West",,,],
["+ Weather Maps","","","","Weather Maps","","","1",""],
Delete + signs from your items:
[" Home","index.php","","","Home","","","1",""],
[" Current Weather","","","","Current Weather","","","1",""],
["|Hourly Forecast","index.php?forecast=avnmos&zipcode=55744&oc=mosview_option|forecast","","","Hourly Forecast",,,],
["|Warnings/Advisories","index.php?forecast=warnings&zipcode=55744","","","Warnings/Advisories",,,],
["|Special Weather Alerts","index.php?config=&forecast=special&zipcode=55744","","","Special Weather Alerts",,,],
["|Live Weather","javascript:open('../../wxflash/index.htm','_blank')","","","Live Weather",,,],
[" WeatherForum","/forum/index.php","","","Home","","","1",""],
[" Weather Cams","","","","Weather Cams","","","1",""],
["|RapidsCam East","javascript:open_win('../../webcam/eastcam.asp',335,270,0,0,0,0,0,0,0,0,2,'cameast');","","","RapidsCam East",,,],
["|RapidsCam West","javascript:open_win('../../webcam/westcam.asp',367,270,0,0,0,0,0,0,0,0,3,'camwest');","","","RapidsCam West",,,],
[" Weather Maps","","","","Weather Maps","","","1",""],
Q: We bought a Delux Tab single site licence yesterday.We can't figure out how to implement tab menus into our web site.
Can you please give us some advice?
A: In Deluxe Tabs there are two modes:
1. var tabMode=0;
You can create only one level of tabs and assign Object Id's of theDIV's to show when you click on the tab.
["XP Tab 1","content1", "", "", "", "", "", "", "", ],
["XP Tab 2","content2", "", "", "", "", "", "", "", ],
["XP Tab 3","content3", "", "", "", "", "", "", "", ],
["XP Tab 4","content4", "", "", "", "", "", "", "", ],
You should paste your content in the <div> .. </div> tags.
<div id="content1" style=" visibility: hidden;" class="tabPage">
<br><br><br>
<p align=center><img src="img/logo_DM.gif" width=262 height=56 alt="Deluxe-Menu.com"></p>
</div>
<div id="content2" style="visibility: hidden;" class="tabPage">
<br><br><br>
<p align=center><img src="img/logo_DT.gif" width=262 height=56 alt="Deluxe-Tree.com"></p>
</div>
<div id="content3" style=" visibility: hidden;" class="tabPage">
<br><br><br>
<p align=center><img src="img/logo_DTabs.gif" width=254 height=58 alt="Deluxe-Tabs.com"></p>
</div>
2. var tabMode=1;
You can assign only links in this mode.
You should create top level items with subitems.
["XP Tab 1","", "", "", "", "", "", "", "", ],
["|Link 1_1","http://deluxe-tabs.com", "", "", "", "", "0", "", "", ],
["|Link 1_2","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 1_3","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 1_4","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 1_5","testlink.htm", "", "", "", "", "0", "", "", ],
["XP Tab 2","", "", "", "", "", "", "", "", ],
["|Link 2_1","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 2_2","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 2_3","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 2_4","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 2_5","testlink.htm", "", "", "", "", "0", "", "", ],
["XP Tab 3","", "", "", "", "", "", "", "", ],
["|Link 3_1","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 3_2","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 3_3","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 3_4","testlink.htm", "", "", "", "", "0", "", "", ],
["|Link 3_5","testlink.htm", "", "", "", "", "0", "", "", ],
You can use Object ID as well as Link in both modes. Use the following prefixes within item's link field:
"object:" - means that there is object id after it;
"link:" - means that there is a link after it.
"javascript:" - means that there is a javascript code after it, for example:javascript:alert(\'Hello!\')
So, you should write for example:
["|Link 1_1","object:Content1_1", "", "", "", "", "0", "", "", ],
Q: Is there a way to programmatically close a hover popup via javascript?
A: You can close the popup using the following function:document.getElementById('win').hide();
Unfortunately it won't work if you use iframe as window content.
You open another page in the popup (in Iframe) so you cannot access
document.getElementById('win').hide();
element which is situated on the first page.
When you use text or object_id as window content the content of the popup will be situated
on the same page so you can access document.getElementById('win') element and hide it.
There is a workaround for Iframe.
Use text as content type and add the following code inside popup:
<a onclick="document.getElementById('win').hide();">...</a> <iframe></iframe>