Forum: Ruby on Rails unterminated string literal

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B3f72425c52023e6a6bb2412bd1f5a28?d=identicon&s=25 Holger Pillmann (holgi)
on 2006-12-31 00:36
(Received via mailing list)

I am not able to solve this problem on my own.

I have a  nested Div tag like this:
<div id="training" >
<div id="daytraining" >Training

Some other elements should insert content here by:
<%= content_tag("div" ,"Training",:id => "#{}" ,
    :onmouseover => update_daytraining(training)) %>
ApplicationHelper has a method like this:
def update_daytraining(training)

 update_page do |page|
 page.insert_html :bottom, 'daytaining',

I get now following javascripterror :
Error: unterminated string literal
} catch (e) { alert('RJS error:

Source Code is:
<div onmouseover="try { new Insertion.Bottom("daytaining", "
Test:2006-12-07"); } catch (e) { alert('RJS error: ' + e.toString());
alert('new Insertion.Bottom("daytaining", "
Test:2006-12-07");'); throw e }" id="7" style="background-image: none;
background-color: transparent;">Training</div

What is going wrong here???
Has anyone solved anything like this???

This topic is locked and can not be replied to.