[web2py] Re: using ajax and load for modular applications

2012-06-02 Thread Anthony
> > In the book example, response.ajax (which should be response.js) is set in >> the edit_items() function, which is always called as an Ajax component. You >> are setting it in your view() function, but I can't see where that function >> is actually called, so I don't know if it is being call

[web2py] Re: using ajax and load for modular applications

2012-06-02 Thread Andrew
I didn't know that. I've always specified so that I could control where in the HTML it would go.

[web2py] Re: using ajax and load for modular applications

2012-06-02 Thread angle
Thanks for your comments. I'll answer each one below, along with the answer to Andrew's question in a seperate message. + Full code, and results of view page source (for successful opening page) are attached. On Friday, June 1, 2012 8:01:02 PM UTC+1, Anthony wrote: > > On Friday, June 1, 2012 2

[web2py] Re: using ajax and load for modular applications

2012-06-01 Thread Andrew
Also, I don't see a div with an Id = patient. That's your target. Is it in the code but not in your post?

[web2py] Re: using ajax and load for modular applications

2012-06-01 Thread Anthony
On Friday, June 1, 2012 2:03:23 PM UTC-4, angle wrote: > > Thanks for your response, I've answered your points below: > >> >> > #response.ajax = \ >>> 'web2py_component("%s","patient",ajax=True,vars=vars1)' % URL >>> ('patient') >> >> I think this should be response.js rather than respo

[web2py] Re: using ajax and load for modular applications

2012-06-01 Thread angle
Thanks for your response, I've answered your points below: > > #response.ajax = \ >> 'web2py_component("%s","patient",ajax=True,vars=vars1)' % URL >> ('patient') > > I think this should be response.js rather than response.ajax. > This code is copied from the example 'Designing Modula

[web2py] Re: using ajax and load for modular applications

2012-06-01 Thread Anthony
> > LOAD('default','post.load',ajax=True,target='patient',vars={'scanId':( > request.args[2] or 1)}) > LOAD is an HTML helper that generates a div and a script element, so it should be inserted in a view, not simply called in the controller. > #response.ajax = \ > 'web2py_component