(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    I don't understand how dm_ext_setPressedItem() function works in left navigation menu

Return to Recent Questions


Q: I would like to add the javascript API to a link contained in my website that will have the corresponding item in the deluxe-tree menu act as if it was "clicked".

Presumably I need to add the script (for example) <A HREF="http://deluxe-menu.com/features-info.html" TARGET="_self" "..javascriptHere ..">. Can you give me an example please of what code goes into there.

I presume I use dm_ext_setPressedItem (menuInd, submenuInd, itemInd, recursion) but where do I get the ????Ind data from and make the javascript call in the above link.

A copy of a working example together with where to get the data , perhaps on your own web pages, would help.

A: Deluxe Tree doesn't save a pressed item as it saves a tree state. It works within 1 page only and if you reload the page you should set a pressed item using Javascript API:

function dtreet_ext_setPressedItem (menuInd, itemID)

<script type="text/javascript">

var i = <?php echo $selitem; ?>;
onload=setPressed;
function setPressed()
{
dtreet_ext_setPressedItem(0,dtreet_ext_getItemIDByIndex(0, i));
}

</script>
You should define selitem using server side script.






Return to Recent Questions

Related:
First-rate Responsive Website Builder Software - Beginner-Friendly Guide HTML Page Creator Plugins / Overview  |  Good Responsive Site Maker Program - 2021 Tutorial  |  Fine Open Source Website Maker Software | 2021 Guide  |  Top HTML Site Builder - 2021 Review  |  Smart Cheap and Easy Web Page Builder Tools | Honest Review  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Best AI Website Builder | AI Website Builder | AI Website Maker | Website Generator AI | AI website design generator