Forum: Ruby on Rails page.replace_html

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
85e05b7260af81cbacfea7e7ed4f40fb?d=identicon&s=25 Guest (Guest)
on 2006-05-26 00:52
This is odd.

When I call: page.replace_html 'formdiv', :partial => 'listing' from an
rjs file it renders stuff like:

\n
\n
\n
test
\n
\n test , NY 12344
\n
\n
Phone: (999)999-8888
\n\t\t\n\n
\n \t\n \t\thttp:// \n \t\n
\n
\n \n"); } catch (e) { alert('RJS error:\n\n' + e.toString());
alert('Element.update(\"formdiv\", .\n\n\n
\n

In formdiv.

Does anyone have any ideas why this would display thusly?
85e05b7260af81cbacfea7e7ed4f40fb?d=identicon&s=25 Guest (Guest)
on 2006-05-26 01:15
I figured it out. I had the :update => 'mydiv' option set in the
form_remote_tag.

After I removed, it the JavaScript output magically goes away.

Thanks Guest (me). :)




Guest wrote:
> This is odd.
>
> When I call: page.replace_html 'formdiv', :partial => 'listing' from an
> rjs file it renders stuff like:
>
> \n
> \n
> \n
> test
> \n
> \n test , NY 12344
> \n
> \n
> Phone: (999)999-8888
> \n\t\t\n\n
> \n \t\n \t\thttp:// \n \t\n
> \n
> \n \n"); } catch (e) { alert('RJS error:\n\n' + e.toString());
> alert('Element.update(\"formdiv\", .\n\n\n
> \n
>
> In formdiv.
>
> Does anyone have any ideas why this would display thusly?
This topic is locked and can not be replied to.