Recent Questions
Q: Tell us javascript code to select or highlight the tab and sub tab in javascript tabs navigation.
A: Deluxe Tabs doesn't support API functions which can return theselected tab.
You can set "bselectedItem" and " var bselectedSmItem" parametersbased on your link before you call your data file.
For example, move " var 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: Your service is excellent and I am making progress learning the program. I was able to resolve the transparency issue thanks to your help but, but now I have another one that is stumping me.
I can get the dhtml javascript menu script to show up in my html document and it works as I hoped it would. However, no matter where I put the line of code in my html file, the dhtml javascript menu script always shows up at the very top of the page. The instructions indicate the following:
Copy the following code into clipboard and paste it into the place you want to have the dhtml javascript menu script:
<script type="text/javascript" src="newmenu2.js"></script>
For example, into a table cell:
<table>
<td><script type="text/javascript" src="newmenu2.js"></script></td>
</table>
No matter where I put the code: <script type="text/javascript" src="newmenu2.js"></script>, the menu shows up at the top of the page.
What am I missing?
A: Check that you're using relative position for the dhtml javascript menu script:
var absolutePos=0; var posX="0px"; var posY="0px";
Q: How do I highlight the current tab in a hover tab menu?
A: This Tabs menu can save pressed item automatically within1 page only.
If you open another page, the menu can't remember presseditem.
You should do that manually using Javascript and menu parameters
( var bselectedItem and var var bselectedSmItem) or using any server-side script (php, asp, etc.)
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>
Try that.
Q: I'm interesting in dhtml menue ability to display a different color word on a menu item when the site is on that selected page
A: The menu has only two states normal and mouseover. We'll try to add the pressed state in the future.
You can set a pressed item using Javascript API:
function dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion)
Sets a current pressed item.
menuInd - index of a menu on a page, >= 0.
submenuInd - index of a submenu, >= 0.
itemInd - index of an item, >=0.
recursion = true/false - highlight parent items.
But notice, to use dm_ext_setPressedItem() you should know ID of selected item and subitem. You can't get this ID after you reload your page. That is why you should write your own code on PHP.