I have a view which works as expected: {{extend 'layout.html'}} {{include 'crm/files.html'}} {{include 'crm/dialog.js'}} <a class="button" onclick="javascript: createdialog('edit.html/ todo')"\>Submit</a>
However if I move the line {{include 'crm/dialog.js'}} to the end of the file "crm/files/html" then I get a javascript error when I click the submit button. Why does this make a difference? Does it not just append the files to my view in the order they are included?