I seem to be fairly close. However, there is still one hangup I would
like to see if anybody has an answer for. I''ve discovered the :with
=> option for the remote functions. So now I have this defined in my
element''s div tag:
<div
id = "<%= frame.id %>_title"
class = "<%= frame.html_set%>_title"
style="
border: solid blue 1px;
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 25px;"
onmouseup="<%= remote_function :url => { :controller =>
"test",
:action => "doit", :with =>
''document.getElementById("left_top_frame").offsetTop''}
%>">
The goal here is to store the offsetTop, at least, in the request so I
can get it back out in my controller. However, I''m stuck trying to
figure out a way to escape everything, I''ve tried everything I can
think of. Here''s what the browser is getting:
<div
id = "left_top_title"
class = "basic_title"
style="
border: solid blue 1px;
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 25px;"
onmouseup="new
Ajax.Request(''/test/doit?with=document.getElementById%28left_top_frame%29.offsetTop'',
{asynchronous:true, evalScripts:true})">
Anybody have any idea how I could escape that? Or is there a better
way to go about this?
Thanks!
H
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---