Hi,
I am trying to render RHTML code
using a JavaScript function and innerHTML.
However, the code is shown as plain text
but is not rendered.
function makeLiveTree() {
var rhtmlCode = “<”+"%= live_tree :fstree, …%>";
document.getElementById(‘westContent’).innerHTML = rhtmlCode;
}
output is:
<%= live_tree :fstree, …%>
How do I render RHTML using JS?
For this problem I cannot use RJS.
Thanks for your time,
Tom.