use direct javascript
---
page<<"$(''chart_id'').reload(#{params[:data_path])})"
---
try using "call",
call(function, *arguments, &block)
Calls the JavaScript function, optionally with the given arguments.
If a block is given, the block will be passed to a new
JavaScriptGenerator; the resulting JavaScript code will then be wrapped
inside function() {
} and passed as the called functions final
argument.
jrm wrote:> Hi,
>
> I am using Open Flash Charts (http://teethgrinder.co.uk/open-flash-
> chart/) in a rails project.
>
> Once the flash movie is loaded the dom element of the movie supports a
> javascript function called "reload" to allow you to get the flash
> movie to reload a url that supplies chart data. This is a cool
> feature and I want to use it to make switching between chart data
> really responsive.
>
> I have set up some link_to_remote links that call a controller method
> that contains a simple inline rjs statement to call the "reload"
> function on the dom id of the flash movie:
>
> def reload_data
> render(:update) { |page|
> page[params[:chart_id]].reload(params[:data_path])}
> end
>
> This is where I found that the JavaScriptElementProxy class in the
> prototype helper contains a "reload" method - which hides the
native
> reload function on the dom element.
>
> My question: How can I bypass the JavaScriptElementProxy methods
> without hacking the ActionPack code.
>
> Of course I could skip the Ajax links and just do pure client side
> onclick events, but I would like to know how do deal with the issue I
> have found.
>
> Thanks in advance rail dudes...
>
> James
--
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---