Recent Questions Extjs West Menu Tree
Q: I know. I have two menus on the page and I am not using beforeItemImage orafterItemImage for the top menu in javascript (the one you referenced below), but I need it for the second menu. The parameters for that menu are in mainnav_data.js.
Even when I only call dmWorkPath and dmenu.js once, it does not work.
A: See, it is not correctly to use image-based items:
["","", "mainnav_data.files/corpinfo.gif", "mainnav_data.files/corpinfo2.gif", "", "_self", "0", "", "", "", "", ],
and specify beforeItemImage/afterItemImage parameters. They won't work in that case.
You can create such buttons in the following ways:
1) Use image-based menu (images with text).
Create normal and mouse-over state images (with text) for each item:
["","", "mainnav_data.files/corpinfo.gif", "mainnav_data.files/corpinfo2.gif", "", "_self", "", "", "", "", "", ],
["","", "mainnav_data.files/new.gif", "mainnav_data.files/new2.gif", "", "_self", "", "", "", "", "", ],
["","", "mainnav_data.files/xxxxx.gif", "mainnav_data.files/xxxxx2.gif", "", "_self", "", "", "", "", "", ],
2) Use combined background for the menu in javascript items (images without text).
var beforeItemImage = [,]; //left-side image for normal and mouse over state
var itemBackImage = [,]; //background or image for normal and mouse over state
var afterItemImage = [,]; //right-side image for normal and mouse over state
var beforeItemImageW = '';
var afterItemImageW = '';
var beforeItemImageH = '';
var afterItemImageH ='';
But you should create a small images in any Graph Editor, for example:
button_n_back.gif
button_n_left.gif
button_n_right.gif
button_o_back.gif
button_o_left.gif
button_o_right.gif
You cannot use these two methods together!
Q: Is there any way to have a floating menu float in relation to the centre of the screen (not the left of the screen). I have a centre based website. When I use the floating menu and view the site on different screen sizes, the floating menu appears in different places on the x scale. For example, I would like it 20 percent from the edge of my centre based webpage, not 20 percent from the left of the screen. I want the menu to appear on the same horizontal place on my webpage (which is centre based)
A: No unfortunately it is not possible to write
var posX="50% - 20";
You should adjust your coordinates to center the menu with absoluteposition.
Q: I am trying to use the Drop Down Menu in a perl script. I would like to know if this is possible?
A: You can use javascript menu in a perl script. Please, see the examplebelow.
------------------ begin program
#!/usr/bin/perl
#!c:\perl\bin\perl
use CGI; # CGI library
use DBI; # Database library
print "Content-Type: text/html\n\n";
use CGI::Carp qw(fatalsToBrowser);
print '<head>
<!-- JavaScript Tree Menu -->
<noscript><a href=http://deluxe-menu.com/>Javascript Menu byDeluxe-Menu.com</a></noscript>
<script type="text/javascript" language="JavaScript1.2"> var dmWorkPath ="menudir/";</script>
<script type="text/javascript" language="JavaScript1.2" src="menudir/dmenu.js"></script>
<!-- (c) 2005, http://deluxe-menu.com --> </head>';
print "<table>";
print '<tr><td><script type="text/javascript" language="JavaScript1.2" src="menudir/data-deluxe-menu.js"></script></td></tr>';
print '<tr><td>second line</td></tr>';
print '</table>';
exit;
_______________________ end program
Q: Is it possible to make on top of the css tree menu 2 extra buttons:
* Expand all
* Collapse all
Which command do I use???
A: Tree Menu doesn't have such a feature now.
You can write your own function based on the following API functions:
function dtreet_ext_showItem (itemID, visibility)
function dtreet_ext_expandItem (itemID, expand)