You *have to* set the response.files first, then include web2py_ajax.html.
Look how this is done in the example app:
http://code.google.com/p/web2py/source/browse/applications/welcome/views/layout.html
Also notice that web2py_ajax.html already includes jquery and web2py.js:
On Tuesday, March 27, 2012 1:46:50 AM UTC-4, weheh wrote:
Ouch, ouch, ouch ... that causes things to really disintegrate! I tend
to agree with your assessment that there's an order dependence
somewhere. But I don't see it, yet.
I think your URL function is wrong -- URL('static', 'js',
I'm a little confused. Here's what the most recent code looks like:
=== web2py_ajax.html ===
script type=text/javascript!--
// These variables are used by the web2py_ajax_init function in
web2py_ajax.js (which is loaded below).
var w2p_ajax_confirm_message = {{=T('Are you sure you want
What is confusing?
On Tuesday, March 27, 2012 6:09:48 PM UTC-4, pbreit wrote:
I'm a little confused. Here's what the most recent code looks like:
=== web2py_ajax.html ===
script type=text/javascript!--
// These variables are used by the web2py_ajax_init function in
web2py_ajax.js
Yay, Anthony! You 'da man. It works now. Phew. But truth be known, I don't
exactly know what was going on here or what changes made the difference. I
made the URL change you suggested -- it was some ancient code I had written
years ago that I had developed a blindness towards 'cause it seemed
Should be pretty much the same. But note that the response.files approach
relies on some code in web2py_ajax.html.
What do you mean causes havoc? What actually happens? Can you view your
source and see if the files are being referenced as you expect?
We might need to see more of the relevant
havoc ... in that it doesn't work any more. I'm using the latest
version of web2py_ajax.html. The response.files.append() statements
are part of an include file that's in the main layout.html head
section. Here's part of it
!DOCTYPE html
html xmlns='http://www.w3.org/1999/xhtml'
Try
{{include 'scripts.html'}}
{{include 'web2py_ajax.html'}}
You have to add files to response.files before including web2py_ajax.html
because that view calls response.include_files(), which generates the
script and link elements for whatever files are in response.files.
Adding items to
Ouch, ouch, ouch ... that causes things to really disintegrate! I tend
to agree with your assessment that there's an order dependence
somewhere. But I don't see it, yet.
On Mar 27, 11:53 am, Anthony abasta...@gmail.com wrote:
Try
{{include 'scripts.html'}}
{{include 'web2py_ajax.html'}}
9 matches
Mail list logo