Does anyone have dojo.widget.Menu2 working on IE 7 ???

R

Ronald

Hi all,

I'm having problems having the Menu2 widget working on IE 7. This is
taken from the tests directory, where all examples can be found. I'm
using the last stable library dojo-0.4.3-ajax.

If further information is needed, please tell me.

Any help is very appreciated.

Ronald.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Menu System Test</title>
<script type="text/javascript">

var djConfig = {
debugAtAllCosts: true,
isDebug: true
};

</script>
<script type="text/javascript" src="../../dojo.js"></script>
<script type="text/javascript">
dojo.require("dojo.widget.Menu2");
dojo.hostenv.writeIncludes();
</script>
<style type="text/css">
.dojoMenuBar2 {
border-top:1px solid #d4d4d4;
}
</style>

</head>
<body style="background-color: #fff; color: black; padding: 0; margin:
0">

<div dojoType="PopupMenu2" widgetId="submenu1"
contextMenuForWindow="true">
<div dojoType="MenuItem2" caption="Enabled Item"
onClick="alert('Hello world');"></div>
<div dojoType="MenuItem2" caption="Disabled Item" disabled="true"></
div>
<div dojoType="MenuSeparator2"></div>
<div dojoType="MenuItem2" iconSrc="../../src/widget/templates/buttons/
cut.gif" caption="Cut" accelKey="Ctrl+C"
onClick="alert('not actually cutting anything, just a test!')"></
div>
<div dojoType="MenuItem2" iconSrc="../../src/widget/templates/buttons/
copy.gif" caption="Copy" accelKey="Ctrl+X"
onClick="alert('not actually copying anything, just a test!')"></
div>
<div dojoType="MenuItem2" iconSrc="../../src/widget/templates/buttons/
paste.gif" caption="Paste" accelKey="Ctrl+V"
onClick="alert('not actually pasting anything, just a test!')"></
div>
<div dojoType="MenuSeparator2"></div>
<div dojoType="MenuItem2" caption="Enabled Submenu"
submenuId="submenu2"></div>
<div dojoType="MenuItem2" caption="Disabled Submenu"
submenuId="submenu2" disabled="true"></div>
</div>

<div dojoType="PopupMenu2" widgetId="submenu2">
<div dojoType="MenuItem2" caption="Submenu Item One"
onClick="alert('Submenu 1!')"></div>
<div dojoType="MenuItem2" caption="Submenu Item Two"
onClick="alert('Submenu 2!')"></div>
</div>

<div dojoType="MenuBar2">
<div dojoType="MenuBarItem2" caption="File" submenuId="submenu1"></
div>
<div dojoType="MenuBarItem2" caption="Edit" submenuId="submenu2"></
div>
<div dojoType="MenuBarItem2" caption="View" disabled="true"></div>
<div dojoType="MenuBarItem2" caption="Help" submenuId="submenu2"></
div>
<div dojoType="MenuBarItem2" caption="Click Me" onClick="alert('you
clicked a menu bar button');"></div>
</div>

<div style="padding: 1em">

<h1>This page has a menu bar and context menu</h1>

<h3>Popup opening tests</h3>

<ul>
<li>Right clicking on the client area of the page (ctrl-click for
opera) should make a popup menu appear.</li>
<li>Right clicking near the righthand window border should open the
menu to the left of the pointer.</li>
<li>Right clicking near the bottom window border should open the
menu above the pointer.</li>
<li>Scrolling the contents of this scrollable area and right-
clicking should make the menu appear at the pointer.</li>
<li>When the popup menu appears, it should not have any items pre-
selected (blue background by default - ymmv).</li>
<li>In IE, test bleed through here <select><option>popupmenu</
option><option>should</option><option>cover</option><option>this</
option><option>select</option></select></li>
</ul>


<h3>Popup hover tests</h3>

<ul>
<li>Hovering over the first item with the pointer should highlight
it.</li>
<li>Hovering over the second (disabled) item should also highlight
it.</li>
<li>Seperator items should not highlight on hover - no items should
highlight in this case.</li>
<li>Removing the pointer from the menu should de-highlight all
items.</li>
</ul>


<h3>Popup click tests</h3>

<ul>
<li>Clicking on the first menu item should alert with the message
"<i>Hello world</i>". The menu should dissapear.</li>
<li>Clicking on the second menu item (disabled) should not do
anything - focus should remain on the disabled item.</li>
<li>Clicking anywhere outside the menu should hide the menu.</li>
</ul>

</div>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top