I created a custom page for our site, but the button context menu won't display.
Return to Recent Questions
Q:
I created a custom page for our website, but the button context menu won't
display.
I found that this was due to the erroneous "current directory" for a button context menu images.
which is: level2/level3/
I changed the script code from:
<script type="text/javascript">var dmWorkPath = "DMworkfiles/";</script>
<script type="text/javascript" src="DMworkfiles/dmenu.js"></script>
to:
<script type="text/javascript">var dmWorkPath = "DMworkfiles/";</script>
<script type="text/javascript" src="/DMworkfiles/dmenu.js"></script>
I also had to prefix all of the links in the button context menu with a "/" to indicate
the root directory because of the "current directory" for the bad page.
The problem is that the little button context menu arrow .gif cannot be
found in the "current working directory".
What am I doing wrong or missing here?
A:
Try to use additional parameters to make button context menu paths absolute:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
These parameters allow to make images and links paths absolute.
For example:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
var menuItems = [
["text", "index.html", "icon1.gif", "icon2.gif"],
];
So, link path will be look so:
http://domain.com/pages/index.html
Images paths will be look so:
http://domain.com/images/icon1.gif
http://domain.com/images/icon2.gif
Please, try to use these parameters
Return to Recent Questions
Related:
- March 12, 2009 - I don't understand, how can change place of the icon in button context menu...
- March 28, 2009 - Is it necessary to add dmWorkPath parameter in the button context menu?
- Apr 14, 2009 - The page I try to open in button context menu could not found...
- May 02, 2009 - How can I add "|" separating in the menu items with your button context menu?
- May 19, 2009 - I built the button context menu and tried it in my site and I see text only...
- Jun 06, 2009 - I tried to create the html version of the button context menu but it is still not working.
- Jun 22, 2009 - Is it possible to have all of the submenus start at the top of the button context menu.
- Jul 10, 2009 - How do you created a multiple column for the button context menu.
- Aug 13, 2009 - Does your button context menu have the ability to have small text boxes on it?
- Aug 30, 2009 - Is it possible to load an Iframe into one of the items in button context menu?
- Sep 17, 2009 - Can you let me know, if button context menu supports search engine friendly code?
|