|
|
..if I try and use the syntax ["| with some HTML such as <DIV class = 'myclass'> inside dropdown menu it IGNORES the HTML..
Return to Recent Questions
Q:
It seems that if I try and use the syntax ["| with some HTML such
as <DIV class = 'myclass'> inside dropdown menu it IGNORES the HTML and just treats it
like another link.
But if I don't start the line with ["| ..... Then I get a syntax error.
For example:
I am trying to place 4 links in a square shape in the top left of
my screen. To do this I was going to create DIV's and set the TOP
and LEFT to different values from within a loop (I left out the code
that does the updating for myleft and mytop...)
var menuItems = [
<loop>
["|<div style='position: absolute; left:
<cfoutput>#myleft#</cfoutput>px; top:
<cfoutput>#mytop#</cfoutput>px>'","", "", "", "", "", "", "", "",
"", "",],
["|#ParentMenuDesc#","index.cfm?Workflow=#Workflow#&role=#Privilege_id#&cacheid=#createuuid()#&Process_Type=#Process_Type#&PageMode=#Process_Logic#",
"#menu_option_icon#", "", "", "_top", "", "", "", "", "",],
["|</div>","", "", "", "", "", "", "", "", "", "",],
<end loop>
];
What am I doing wrong here?.... Can you show me how to accomplish this task?
A:
No, this syntax is incorrect. It won't work.
var menuItems = [
<loop>
["|<div style='position: absolute; left: <cfoutput>#myleft#</cfoutput>px; top: <cfoutput>#mytop#</cfoutput>px>'","", "", "", "", "", "", "", "", "", "",],
["|#ParentMenuDesc#","index.cfm?Workflow=#Workflow#&role=#Privilege_id#&cacheid=#createuuid()#&Process_Type=#Process_Type#&PageMode=#Process_Logic#", "#menu_option_icon#", "",
"", "_top", "", "", "", "", "",],
["|</div>","", "", "", "", "", "", "", "", "", "",],
<end loop>
];
You should have <div> ... </div> tags in each dropdown menu item!
It is not correctly to write <div> ... </div> tags for whole
submenu.
var menuItems = [
["|<div style='position: absolute; left:<cfoutput>#myleft#</cfoutput>px; top: <cfoutput>#mytop#</cfoutput>px>text</div>'","", "", "", "", "", "", "", "", "", "",],
["|#ParentMenuDesc#","index.cfm?Workflow=#Workflow#&role=#Privilege_id#&cacheid=#createuuid()#&Process_Type=#Process_Type#&PageMode=#Process_Logic#", "#menu_option_icon#", "",
"", "_top", "", "", "", "", "",],
["| ","", "", "", "", "", "", "", "", "", "",],
];
Return to Recent Questions
Related:
- Sep 06, 2006 - The alighment of the dropdown menu is off to the right in Firefox...
- Sep 06, 2006 - The first item of the html drop down menu stays highlighted.
- Sep 11, 2006 - How can I hide my dropdown menu on print?
- Sep 11, 2006 - If I use doctype the settings of the submenus in javascript dropdown menu get lost.
- Sep 16, 2006 - I need to be able to highlight the selected menu item of the html tree menu.
- Sep 25, 2006 - My menu icons are not appearing in the preview, or when I launch deluxe-menu.html
- Sep 26, 2006 - Is there a way to change the height of the main buttons in my simple dhtml menu.
- Oct 01, 2006 - All of the items in html pull down menu are different sizes.
- Oct 20, 2006 - Can you let me know, if javascript moving menu supports search engine friendly code?
- Oct 22, 2006 - When the html submenus are over applet in https: the applet disappeared.
- Oct 27, 2006 - In IE 6.0 and Firefox 1.5.0.4, the submenus of my dhtml dropdown menu are not visible
|