I have done "view source" in the browser and looked line by line and
the two versions are identical.  How is it possible to have two
identical html source files that produce different results? Is there
some header that is not visible in the browser view source?

I have also simplified to the view below where crm/files.html is
empty. This works but when I move the js/crm.js line into crm/
files.html then it fails again when it accesses a jqueryui dialog
function with the error is "Uncaught TypeError: Object [object Object]
has no method 'dialog')"

{{extend 'layout.html'}}
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/
themes/{{=response.theme or "smoothness"}}/jquery-ui.css"
rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/
jquery-ui.min.js" type="text/javascript"></script>
<link href="{{=URL('static', 'css/crm.css')}}" rel="stylesheet"
type="text/css" />
<script src="{{=URL('static', 'js/crm.js')}}" type="text/javascript"></
script>
{{include 'crm/files.html'}}

<div id="formdiv" style="display:none"></div>

<a class="button" onclick="javascript: createdialog('edit.html/
todo')"\>Submit</a>

On Nov 6, 1:07 am, Anthony <abasta...@gmail.com> wrote:
> 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?

Reply via email to