In the latter case, what does the generated HTML code look like? Is the dialog.js content in there?
Also, is dialog.js just a static JS file? If so, why not put it in the /static folder and link it via a <script> tag where needed (or by adding it to response.files, so web2py_ajax.html will automatically link it)? Anthony On Saturday, November 5, 2011 8:49:46 PM UTC-4, apple wrote: > > 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? > >