Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6212679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:33:41+00:00 2026-05-24T06:33:41+00:00

I am using Dijit Menu bar with declartive markup. The Menu items contains links

  • 0

I am using Dijit Menu bar with declartive markup.

The Menu items contains links (‘a’):

<li dojoType="dijit.MenuItem" id="i_car_new">
   <a href="/RooTest/cars?form">Create new Car</a>
</li>

The menu is rendered correct, and even the link is display as link, but when one click on this link in the menu, noting happens. (My actual workaround is to add an ‘onClick’ event with an ‘window.location’.)

But I would expect that the links work like normal (user click, browswer request new page). So is my expectance wrong? And what must I change, that the links work?

relevant parts from the html.file

<html>
<head>
...
<script type="text/javascript">var djConfig = {parseOnLoad: true, isDebug: false};</script>
<script type="text/javascript" src="/RooTest/resources/dojo/dojo.js"></script>
<script type="text/javascript" src="/RooTest/resources/spring/Spring.js"></script>
<script type="text/javascript" src="/RooTest/resources/spring/Spring-Dojo.js"></script>
<script type="text/javascript" language="JavaScript">dojo.require("dojo.parser");</script>
</head>
<body class="tundra spring">
    <div version="2.0" id="menu" dojoType="dijit.MenuBar">
    <script type="text/javascript">
            dojo.require("dijit.MenuBar");
            dojo.require("dijit.PopupMenuBarItem");
            dojo.require("dijit.Menu");
            dojo.require("dijit.MenuItem");
            dojo.require("dijit.PopupMenuItem");
     </script>

     <ul id="_menu">
        <li dojoType="dijit.PopupMenuBarItem" id="c_car">
            <h2>Car</h2>
            <ul dojoType="dijit.Menu">
                <li dojoType="dijit.MenuItem" id="i_car_new">
                   <a href="/RooTest/cars?form">Create new Car</a>
                </li>
                <li dojoType="dijit.MenuItem" id="i_car_list"
                    <a href="/RooTest/cars">List all Cars</a>
                </li>
            </ul>
        </li>
     </ul>
</div>
<div id="main">...</div></body></html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:33:41+00:00Added an answer on May 24, 2026 at 6:33 am

    The reason you don’t navigate away from the page when you click is because the MenuItem calls dojo.stopEvent when you click it – see _onClick() at http://trac.dojotoolkit.org/browser/dojo/tags/release-1.6.1/dijit/MenuItem.js#L92

    If you want to do this a lot I’d be tempted to extend the MenuItem with something like (old syntax, I’ve not moved over to the new AMD way of doing things yet, and untested):

    dojo.provide('dijit.anchorMenuItem');
    dojo.require('dijit.MenuItem');
    
    dojo.declare('dijit.anchorMenuItem', dijit.MenuItem, {
        _onClick: function(evt) {
            this.getParent().onItemClick(this, evt);
        }
    });
    

    And then use this in place of the default MenuItem when you want a simple link. Otherwise, do as your saying and add a call to window.location on the onClick handler, but I think this is neater personally.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my example below I'm using a dijit.form.DateTextBox : <input type=text name=startDate dojoType=dijit.form.DateTextBox constraints={datePattern:'MM/dd/yyyy'}
I have a Dijit.Tree control written as markup code. Now I'm using the onload
I have a dijit validationtextbox widget: <input dojoAttachPoint=tbIPAddress type=text size=15 class=ipaddress dojoType=dijit.form.ValidationTextBox required=true regExp=^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$
I am using dijit.form.FilteringSelect to provide a way to select values from a <select>.
I am using dijit.form.dropDownbutton in my application. However, I want to remove the down
iam using an dijit.form.NumberTextBox, if no value is inside it returns NaN , is
I'm using dojo and dijit and have an inlineEditBox widget. I'm trying to capture
I have a dijit.Tree that's populated by a ItemFileReadStore using JSON. Because of our
When using the dijit.form.NumberSpinner widget, the arrow buttons don't show up on IE6, unless
I am using a dijit.form.TextBox for a login form but cannot make browser-saved passwords

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.