I have this div in my application.rhtml file:
When I go to another view I am doing this:
def turin2000
render :update do |page|
page[:shelfcards].replace_html :partial => ‘turin2000’
end
end
I get this for an output:
try {
$(“shelfcards”).update("
\nSelect your card type\n\n\t
div>\n\t<div id=‘oc12’ \t\tclass=‘card’ >OC-12\n\t<div id=‘oc3’
\t\tclass=‘card’ >OC-3
\n\t<div id=‘28pds1’
\tclass=‘card’ >28P DS-1
\n\t<div id=‘egcm’ \t
\tclass=‘card’ >EGCM
\n\t<div id=‘gbeth’
\tclass=‘card’ >GB ETH
\n\t<div id=‘vt5g’ \t
\tclass=‘card’ >VT 5G
\n \t\t");
} catch (e) { alert(‘RJS error:\n\n’ + e.toString()); alert(’$
(“shelfcards”).update("<fieldset style=‘width: 400px;’>
\nSelect your card type\n\n\t<div id=‘oc192’
class=‘card’ >OC-192\n\t<div id=‘oc48’ \t\tclass=‘card
’ >OC-48\n\t<div id=‘oc12’ \t\tclass=‘card’ >OC-12
\n\t<div id=‘oc3’ \t\tclass=‘card’ >OC-3
\n
\t<div id=‘28pds1’ \tclass=‘card’ >28P DS-1
\n
\t<div id=‘egcm’ \t\tclass=‘card’ >EGCM
\n
\t<div id=‘gbeth’ \tclass=‘card’ >GB ETH
\n
\t<div id=‘vt5g’ \t\tclass=‘card’ >VT 5G
\n</
fieldset> \t\t");’); throw e }
If I put this partial inside the div manually it works fine.
What causes this?