Hello,
I have created a webpage that is split in 2.
On the left there's a tree with items. When I click on an item in the tree, then details about this item are loaded in the right right. In this details view, I have created an instance of the FCKeditor.
These details are loaded by using Ajax and work fine.
But when I click on another item in the tree, new details are loaded with Ajax in the right side of the screen. Then again the FCKeditor must be loaded but then it goes wrong.
I recieve a script error saying telling me that the programcode cannot be executed from a script that is released.
I don't know what it really means and how to solve this problem. I suspect that it happens because with Ajax I write the details with innerHTML in the same window. So when I click on another item it created another instance when to old one is not release/deleted?
I could use a simple textarea for messages, but I want to use the FCKeditor. Can anyone tell me how to make it possible to reload the fckeditor.
Best regards,
Mattijs
I have created a webpage that is split in 2.
On the left there's a tree with items. When I click on an item in the tree, then details about this item are loaded in the right right. In this details view, I have created an instance of the FCKeditor.
These details are loaded by using Ajax and work fine.
But when I click on another item in the tree, new details are loaded with Ajax in the right side of the screen. Then again the FCKeditor must be loaded but then it goes wrong.
I recieve a script error saying telling me that the programcode cannot be executed from a script that is released.
I don't know what it really means and how to solve this problem. I suspect that it happens because with Ajax I write the details with innerHTML in the same window. So when I click on another item it created another instance when to old one is not release/deleted?
I could use a simple textarea for messages, but I want to use the FCKeditor. Can anyone tell me how to make it possible to reload the fckeditor.
Best regards,
Mattijs
RE: Using FCKeditor with ajax
Mattijs,
Why reloading the FCKeditor? Try updating the content throught its API, see http://wiki.fckeditor.net/Developer%27s ... script_API . You can mail me at mail -a-t- saulmade.nl to see a demo of my CMS that works like this, also see screenshots at http://www.saulmade.nl/index.html?page= ... EnDiensten .
Paul
RE: Using FCKeditor with ajax
Also you might be interested in the LFO plugin: http://fckplugins.saulmade.nl/
RE: Using FCKeditor with ajax
You helped me a little, but I didn't solved the problem yet after hours of trying.
The problem that I'm running in at the moment is that I can create the editor with Javscript, using the replace Textarea function after the page is loaded the XMLHttpRequest (in the same function).
The first time it works and the object is created on the form. But when I click again in the tree, every method I use to talk to the FCKobject gives the same result "I recieve a script error saying telling me that the programcode cannot be executed from a script that is released".
Does anyone know how to reuse the editor that is already loaded by the Ajax request in the first tree click, with getting those errors.
I cant seem to find the right scope in which the editor was created.
Help needed, thanks in advance.
Mattijs