I had some trouble getting LOAD to work, so I used something like
this:

In the html:

<div id="variable_text">
</div>
<a href=# id="click_me">Click here</a>

In the javascript:
$document.ready(function(){
    $('#click_me').live('click', function(){
         ajax('make_variable_text', [], ':eval');
    });
});

In the controller:
def make_variable_text():
    # do stuff to create text
    return "$('#variable_text').html('the text you just created');"

Caveat: beware of failures to close quotes and brackets in the sample
code.  I am sloppy that way.

Make sure you strip any new line sequences "\n" out of the text you
return; Firefox chokes on them.

For more info look here 
http://www.web2py.com/book/default/chapter/10#The-ajax-Function

On Oct 25, 9:45 am, annet <annet.verm...@gmail.com> wrote:
> Hi Anthony,
>
> Thanks for your reply, I'll give it a try.
>
> Kind regards,
>
> Annet.

Reply via email to