ΟΚ, that's very helpful. Thanks once again.

On Friday, June 1, 2012 1:14:08 PM UTC-4, Anthony wrote:
>
> <a href='ajax('controller_function/{{=row.id}}', [], ':eval')>X</a>
>>
>
> That would have to be _onclick, not _href, and you'd want to add something 
> like "; return false" at the end to prevent the usual link behavior. 
> Anyway, I suggested an alternative (in a separate post) that's a little 
> simpler.
>
> I'm just not quite sure what you mean that "response.js is only used when 
>> a component is called via web2py_component()." 
>>
>
> Let's say you have a function "myfunc" and you call it via 
> web2py_component() (possibly via the LOAD() helper, or directly). In that 
> case, the myfunc function can set response.js, and when it returns its 
> response, the Javascript code in response.js will get executed on the 
> client. However, if you call myfunc using the ajax() function with the 
> target set to ":eval", the myfunc function should not set response.js, as 
> it will not be executed on the client in that case. Instead, myfunc should 
> just return the Javascript directly, and the ":eval" target will tell the 
> browser to execute that returned response as Javascript.
>
> Anthony
>

Reply via email to