Forum: Ruby on Rails redering CDATA wierdness

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.
paqo (Guest)
on 2005-12-12 00:36
I am attempting to do the sortable_element tutorial from scriptaculous.

Upon viewing the source, I see this line is generated...

<script type="text/javascript">Sortable.create('list',
{onUpdate:function(){new Ajax.Updater('list-info', '/ajax/order',
{onComplete:function(request){new Effect.Highlight('list',{});},
parameters:Sortable.serialize('list'), evalScripts:true,

When I try to do the same thing, Webrick generates the following on my
local machine...

<script type="text/javascript">
Sortable.create('list', {onUpdate:function(){new
Ajax.Updater('list-info', '/moving_list/order', {asynchronous:true,
evalScripts:true, onComplete:function(request){new

My app is so simple I dont know what I could be doing wrong.  Because
this line is treated as a comment, my page doesnt work.

Any ideas?

Ryan K. (Guest)
on 2005-12-12 05:12
(Received via mailing list)
On Dec 11, 2005, at 2:36 PM, paqo wrote:

> parameters:Sortable.serialize('list'), evalScripts:true,
> Effect.Highlight('list',{});},
> parameters:Sortable.serialize('list')})}})
> //]]>
> </script>

This would be the xhtml way of doing things. Its possible that you're
not actually sending an xhtml doctype, which could cause the <style>
element to interpreted as a comment. Anyway, a url would help.

This topic is locked and can not be replied to.