(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:
Offline Mobile Website Builder Software Top Mindblowing HTML Image Slideshow Ideas  |  40+ Free Bootstrap Templates 2021  |  Easy Website Builder Review  |  Free and Easy Website Builder  |  Best 18 Landing Page Bootstrap Theme Roundup  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Free AI Website Builder | Free AI Website Generator | AI web design generator | AI website design generator | AI web page design generator