| | 412 | // example: |
| | 413 | // If your dojo.js is located at this location in the web root: |
| | 414 | // | /myapp/js/dojo/dojo/dojo.js |
| | 415 | // and your modules are located at: |
| | 416 | // | /myapp/js/foo/bar.js |
| | 417 | // | /myapp/js/foo/baz.js |
| | 418 | // | /myapp/js/foo/thud/xyzzy.js |
| | 419 | // Your application can tell Dojo to locate the "foo" namespace by calling: |
| | 420 | // | dojo.registerModulePath("foo", "../../foo"); |
| | 421 | // At which point you can then use dojo.require() to load the |
| | 422 | // modules (assuming they provide() the same things which are |
| | 423 | // required). The full code might be: |
| | 424 | // | <script type="text/javascript" |
| | 425 | // | src="/myapp/js/dojo/dojo/dojo.js"></script> |
| | 426 | // | <script type="text/javascript"> |
| | 427 | // | dojo.registerModulePath("foo", "../../foo"); |
| | 428 | // | dojo.require("foo.bar"); |
| | 429 | // | dojo.require("foo.baz"); |
| | 430 | // | dojo.require("foo.thud.xyzzy"); |
| | 431 | // | </script> |