Problem with tiny_mce

I have a problem with the tiny_mce, i have this javascript in my view
(that javacript works fine because when i didn’t had tiny_mce it
worked fine):


And also I have this in the HTML

. <%= collection_select(:temp,:temp, @templates, :id, :name ,
{:class => ‘selecttag’}, :onchange => “change(value);”) %>
. <%= f.text_area :body, {:id => “text_area_html_content”,:class =>
‘mceEditor’} %>


The ‘onchange’ event of the select tag changes the innerHTML of the
textarea using the javascript above. When I had the text without the
tiny_mce it worked fine, but now with the tiny_mce the innerHTML it
doesn’t works.

Can anyone help me, any ideas?


I solved the issue:

This was the the old script:


This is Ronen Site 1



I changed it to:


Hope it helps someone in the future,