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