Images not displaying in Menu


I’m init’ing a Menu from XML.

XML looks like this…

<?xml version="1.0" encoding="UTF-8"?>
  <item text="Action" id="action-menu">
    <item text="Copy Items" img="copy.gif" id="copy-items"/>


var menu = dhxLayout.cells("b").attachMenu();
menu.setIconsPath("http://localhost:2222/images"); // have tried various things here
menu.loadXML("menu/show.xml?etc="+new Date().getTime());
menu.attachEvent("onClick", this.handleMenuEvents);

I can reach localhost:2222/images/copy.gif in a browser

Any suggestions? Thanks!

Figured it out. The code needed to be…

menu.setIconsPath("http://localhost:2222/images/"); // needs the trailing slash