Could not load ‘dijit.Menu’

dojo

I want to run Dojo/Dijit with the Google CDN:

<script type="text/javascript" 
         src="http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js">
</script>

I've tried 1.3.2, 1.3, 1.2 and all give this same problem.
If what I've read is true, I only need to include the dojo.xd.js – then the requires will properly find dijit somehow relative to dojo.

In Firebug I see the following:

http://ajax.googleapis.com/ajax/libs/dojo/1.2/dijit/Menu.js
200 OK

I'm confused by this, because I if http status=200 is okay – then why is this line showing up in red?

The next line says

could not load 'dijit.Menu'; last
tried '../dijit/Menu.js'

I had this working with all the Dojo/Dijit source code local – but I'm determined to get it running with the CDN.

I did some searches, and the best I could find was that Menu.js was included in certain releases, but I think they were talking 1.2 or before.

Same error occurs in the Chrome browser.

Thanks for helping.
Neal Walters

More Info Added:

Thanks for the example. I took it and got a simple menu working:

http://3wcloud-com-provisioning-qa.appspot.com/testDijitMenuOnly

Here's the "beast" that I'm trying to get working.
http://3wcloud-com-provisioning-qa.appspot.com/testDijit

This was originally a copy of the Dojo Theme demo – and it was working when I was running with Dojo local. It does a delayed/manual parse.

Like I said above, I tried 1.2, 1.3, 1.3.2 and so on, so it was just a matter of timing when I copyied/pasted into my question.

And OOPS – I didn't have djconfig – so I added that – but similar problem – just more explicit paths.

Thanks again – I'm going to love Dojo when I over these little humps.

This is the page I'm trying to reproduce:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/themes/themeTester.html?theme=soria

Best Answer

Do you have something strange in your djConfig? The fact that it's spitting out "../dijit/Menu.js" makes it seem like you have a path setting in there.

I set up a simple demo page that uses the Google CDN and does:

dojo.require('dijit.Menu')

without problem.

Also, the script tag has 1.3.2 but it's loading menu from 1.2 which is strange.

Post a the full source code of what isn't working and that'll help track down the problem.

EDIT AFTER POSTING LINK

Remove these lines from your testDijit page:

<script type="text/javascript" src="/dijit/dijit.js"></script>

<script type="text/javascript" src="/dijit/dijit-all.js" charset="utf-8"></script>

YET ANOTHER EDIT

Call me crazy (since you don't seem to approve or upvote answers on SO making this a kind of no-op for me) but I got it working with the CDN here.. It still has problems because the CDN doesn't have all the test files on it (dijitTest.css and countries.json for example). You can download it and do a diff on your ow file to see what I changed. I mostly added a bunch of missing requires and changed paths to CSS and images. You also have a script tag referencing /dojo.js in your file.

I'm curious why you are so driven on getting the dijit tester running on your app since it seems like it'd be more fun/productive to learn dojo solving problems within your application.