Rich Text Editor and link_to_remote

Hi

How can I get link_to_remote to call a new page and respect the javascript within that page.

I do have an edit page for datarecords, that have a textarea which is enhanced with the YUI Rich Text Editor. If I call that edit page through link_to_remote, the editor isn't displayed. If i call it without the AJAX, it works fine.

What can I do?

i don't know the YUI editor, but in principle the ajax call will not execute any code that's needs events like onload. you could put that stuff into an init function and execute that with the ajax call:

render :update do |page|   ... your 'normal' ajax stuff ...   page.call "init_function" end