I have in my code
and it works fine the first time the div is refreshed. From the second time on it apparently works, however I am getting an error: Uncaught TypeError: Cannot call method 'destroy' of undefined (on developer tools of Chrome). Furthermore, it saves the data multiple times into the database. Any idea why it is throwing that error?
CKEDITOR.instances['responseN'].destroy(true);
and it works fine the first time the div is refreshed. From the second time on it apparently works, however I am getting an error: Uncaught TypeError: Cannot call method 'destroy' of undefined (on developer tools of Chrome). Furthermore, it saves the data multiple times into the database. Any idea why it is throwing that error?