Recent Questions
Q: We are experimenting with your library but can't seem to make it work. I am getting "d_ddm is undefined" in dmenu_popup.js menu script.
Could you tell me what we are doing wrong?
A: You should change
onClick="return dm_popup(1, 500, event);
to
onClick="return dm_popup(0, 500, event);
If you have only one menu on the page your menuInd = 0;
Q: Is there a way to programmatically specify which tab is selected in the drop down menu using javascript?
What I mean is, I want to set the selected tab programmatically (Not clicking the tab).
A: Deluxe Tabs doesn't support API functions which can return theselected tab.
If your site is written on PHP you can set "bselectedItem" and "varbselectedSmItem" parameters based on your link beforeyou call your data file.
For example, move "bselectedItem" and " var bselectedSmItem" parametersfrom 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>
Q: It works great in IE, but doesn't work in Firefox.
A: Please, try to specify units in "px".
For example:
var itemPadding = "3px";
Try that.
Q: Could you please just help me - I have been using quirks mode to create our customer sites and would now like to start using a proper doctype like:
But when I change it, all the down menus dhtml break on the sites.
A: Try to specify all units in "px":
var itemPadding="3px";
var itemStyles = [
["fontStyle=normal 11px Lucida SansUnicode","fontColor=#FFFFFF,#FFFFFF","itemBackColor=#DE2829,#C62829","itemBorderWidth=0",
"itemBorderColor=#FFFFFF,#C21212","itemBorderStyle=solid,solid",
"itemBackImage=blank.gif,blank.gif","itemWidth=160px"], ["itemWidth=129px"],
];
var menuStyles = [
["itemSpacing=0", "itemPadding=8px"]
];