Forum: Ruby on Rails Ajax functions with embedded objects

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.
Henrique T. (Guest)
on 2006-02-28 15:33
In my project, there is an rhtml page with an embedded SVG file. In my
javascript functions, I can find an object by id inside the SVG file
with the following:

ObjectInSVG =

Now, I want to use Ajax methods, like link_to_remote, in the rhtml page
to manipulate the SVG objects. The problem is that link_to_remote method
uses the id to identify the object... but the object is embedded! Is
there any way to pass the object reference to the link_to_remote instead
of just the id?

Thanks for the help!

Bogdan I. (Guest)
on 2006-02-28 17:14
(Received via mailing list)
I am assuming that you would like to do something like
If that is the case you could do

function init_svg(svg_id, content){
> tById(svg_id), content)

You should check in prototype.js if $() accepts objects and not just the
string (I suspect that it does)

This topic is locked and can not be replied to.