Re: [web2py] javascript in layout.html

2010-09-30 Thread Manu
> I think putting that 17 lines in 'layout.html' is not a good idea, because > 'layout.html' are there for you to replace or customize, putting more JS out > there, users will need to implement that by their own. I totally agree with that just in case people doesn't want to have many small files ar

Re: [web2py] javascript in layout.html

2010-09-30 Thread Bruno Rocha
I think putting that 17 lines in 'layout.html' is not a good idea, because 'layout.html' are there for you to replace or customize, putting more JS out there, users will need to implement that by their own. And what is the difference being in web2py_ajax or in layout.html? as these files will be m

Re: [web2py] javascript in layout.html

2010-09-30 Thread Manu
Hi Bruno , I agree with you for the first 17 lines , but after that it is just regular javascript/jquery code !! Furthermore what is done in these first 17lines is indeed parsed but could have been put somewhere else ( in layout.html for ex, or in in another file that has to be included in your c

Re: [web2py] javascript in layout.html

2010-09-30 Thread Bruno Rocha
Correction: 'web2py_ajax.html' does not have string interpolation, this have to be parsed by web2py template system, because uses {{=}} notation to build scripts. 2010/9/30 Bruno Rocha > In layout.html you can call external JS files using: > > {{response.files.append(URL(request.application

Re: [web2py] javascript in layout.html

2010-09-30 Thread Bruno Rocha
In layout.html you can call external JS files using: {{response.files.append(URL(request.application,'static/js','javascriptfile.js'))}} Scripts are also loaded dinamicaly by 'web2py_ajax.html' which builds the JS script at runtime, as this uses string interpolation to build scripts, this could n

[web2py] javascript in layout.html

2010-09-30 Thread Manu
Hi, What is the reason to not have these functions into a dedicated external file. By including it in the html page we can't use the browser cache and we need to transfer it again and again , sounds me a waste of time transfer and bandwidth. As i am not a web expert ( i am actually learning with