Cliff thanks for the heads up

Except I am not sure what :eval means in that context.

Thanks.



On 7/18/11 4:10 PM, Cliff wrote:
Notice the ':eval' as the last parameter to the ajax call.

ajax('{{=URL('revive_parrot')}}', ['dead_parrot_id'], ':eval')

If 'revive_parrot' ends with the following it will not work because
the call to set the html chokes on the newlines.

return '''jQuery('#parrot_state').html("bla bla
bla bla")'''

This will work.

out = '''jQuery('#parrot_state').html("bla bla
bla bla")'''
return out.replace("\n", '')

Don't ask me how long it took this 'experienced programmer' to find
this out.



Reply via email to