Massimo, I appreciate the response, but am finding your answer very
difficult to understand. In particular, I don't have a clue as to what
your callback is doing. What is response.js? Why are you returning
"hello world" when response.js is outputting "hello!". Is there any
chance you can rewrite the original example at the top of this thread
so that it would work? Thanks. - RG

On Dec 24, 12:09 am, mdipierro <[email protected]> wrote:
> It depends on how you do the ajax call:
>
> I suggest you can use the web2py_ajax.html function:
>
>    web2py_ajax_page(method,action,data,target)
>
> For example in view
>
> <button
> onclick="web2py_ajax_page('POST','{{=URL('callback'}}}',null,'target');">click
> me</button>
> <div id="target">
>
> and in controller
>
> def callback():
>     response.js = "jQuery('.flash').html('hello!').fadeIn();"
>     return "hello world"
>
> Massimo
>
> On Dec 23, 7:19 pm, weheh <[email protected]> wrote:
>
> > Let me try to state this more succinctly:
>
> > How do I get a jQuery, which is created by a controller in response to
> > an ajax call, to execute when loaded into it's target div?
>
>

Reply via email to