Hi All
I would like to manipulate a javascript object which I''ve created as
follows:
<SCRIPT>
function onLoad() {
myJSobject = new MyClassName.Init(10,20, <%= ruby_arr.to_json
%>)
}
</SCRIPT>
.... HTML stuff..... here
This object is used to manage the page (like replace DIVs depending on
the actions of the user)
So, what I would like to do with this object from within the RJS is to
change values and add functions.
For example, what I''ve tested (but didn''t work) is
page.myJSobject.varname = 10
Any suggestions ?
Thnx
LuCa
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---