1

I downloaded the latest Dojo and Dijit to my local Windows 10 computer.

My disk structure is:

C:\webapps 
c:\webapps\dojo 
c:\webapps\demo 
c:\webapps\dijit 

I'm clicking on this file to load with Chrome browser: c:\webapps\demos\themePreviewer\demo.html

It shows the following, and is stuck forever with the "Loading..." message.

enter image description here

Internally, I see the following references to css files:

    <link rel="stylesheet" href="../../dijit/themes/claro/document.css"/>
    <link rel="stylesheet" href="../../dijit/themes/claro/claro.css"/>

I can see those on my disk, here:

c:\webapps\dijit\themes\claro\document.css 
c:\webapps\dijit\themes\claro\claro.css

Seems like it's a problem finding the files? But wouldn't Chrome debug tell me that? I also tried copying the dijit directory to:

c:\webapps\demo\dijit

Later I noticed there is one href in the program: href:'../../dijit/tests/layout/getResponse.php?delay=3000&messId=3'

that I changed to: href:'http://demos.dojotoolkit.org/dijit/tests/layout/getResponse.php?delay=3000&messId=3'

GibboK
  • 71,848
  • 143
  • 435
  • 658
NealWalters
  • 17,197
  • 42
  • 141
  • 251

1 Answers1

1

Try to run the app from a localhost instead of file:///. In case the problem persist, you could debug it more and see if some dependencies are missing using Chrome Developer Tools > Network tab, in this way you should be able to identify any 404 errors.

GibboK
  • 71,848
  • 143
  • 435
  • 658
  • This can be the issue. I have faced this many times. Usually, there is a warning in Chrome's console regarding this also. It's always best to load this via a server. I use [XAMPP Server](https://www.apachefriends.org/download.html) for this. – Himanshu Jul 28 '17 at 06:08
  • Yes definitely any server would do the job :) Please let me know how you were able to solve your issue. – GibboK Jul 28 '17 at 06:30
  • PS: If you found my answer useful, please do not forget to upvote/accept it. Thanks for it :). – GibboK Jul 28 '17 at 06:30
  • I used nodeJS http-server and it worked: https://stackoverflow.com/questions/16333790/node-js-quick-file-server-static-files-over-http. But why? Why wouldn't file system work equally well? – NealWalters Jul 28 '17 at 17:48
  • @NealWalters It could be related to a configuration issue on XAMPP Server. Thanks for accepting my answer :) – GibboK Jul 28 '17 at 19:34