Re: [web2py] Javascript load order and templates

2017-03-31 Thread David Orme
Ha, I was right: > Do blocks allow me to split insert the contents of a view into different > parts of the layout? It’s a good thing that it is a really complex mechanism, so I don’t look like a total idiot ;-) Many thanks - fantastic to get such a quick answer. Cheers, David > On 31 Mar

Re: [web2py] Javascript load order and templates

2017-03-31 Thread Carlos Costa
A proper way to do this is to put the page javascript in the page_js block It is the declared in the default layout.html. To use it just do this in your view {{block page_js}} ...put your js here... {{end page_js}} This way it will be inserted in the right place into the rendered page. 2017-0

[web2py] Javascript load order and templates

2017-03-31 Thread David Orme
Hello, I'm using wavesurfer in a site, so have included it at the bottom of layout.html. http://cdnjs.cloudflare.com/ajax/libs/wavesurfer.js/1.0.52/wavesurfer.min.js";> But then one of my views has javascript code to setup a wavesurfer player. This is currently included at the bottom of