| 39 | | [dojo template here...] |
| | 39 | Quite frankly, that part is going straight-forward, as we're only writing HTML: |
| | 40 | {{{ |
| | 41 | <script type="text/javascript"> |
| | 42 | djConfig = { |
| | 43 | isDebug:true, |
| | 44 | debugAtAllCosts:false |
| | 45 | }; |
| | 46 | </script> |
| | 47 | <script type="text/javascript" src="/media/js/dojo/dojo.js"></script> |
| | 48 | <script type="text/javascript"> |
| | 49 | dojo.require("dojo.event.*"); // sophisticated AOP event handling |
| | 50 | dojo.require("dojo.io.*"); // for Ajax requests |
| | 51 | dojo.require("dojo.json"); // serialization to JSON |
| | 52 | </script> |
| | 53 | <script type="text/javascript" src="/media/js/ajax.js"></script> |
| | 54 | }}} |
| 41 | | Then let's push forward and write down the core JS file, for doing AJAX-related things: |
| | 56 | The ''djConfig.isDebug'' parameter is important for debugging, so you should |
| | 57 | consider setting it to "true" when inspecting you're application with Firebug |
| | 58 | or something else. |
| | 59 | |
| | 60 | Optionally, you can "bake" your own Dojo file, and substract the baked modules |
| | 61 | from the list of required modules above, so we wont load the already compiled |
| | 62 | Dojo modules twice. |
| | 63 | |
| | 64 | Let's push forward and write down the core JS file, for doing AJAX-related things |
| | 65 | with our own custom-compiled Dojo module: |