Rich Brant
2006-Jan-28 13:49 UTC
[Rails] calling javascript via "eval(request.resopnseText") help needed.
I have a link_to_remote method: <%= link_to_remote image_tag("clock_run.gif", :border=>''0''), :update => @task.id, :complete=>"eval(request.responseText);", :url => {:controller => ''time_entries'', :action => ''punch_in'', :id => @task} %> The controller ultimately renders a partial: render :partial => "partial/punch_out_link" The partial renders fine, but I''m unable to call any of the javascript methods inside the partial. Shouldn''t I be able to with the set up I have? Maybe a better way, would be to ask, would someone show me a simple example of how I could execute a simple pop up such as: alert(''test''); thanks! rich
Possibly Parallel Threads
- How to use group in nested associations
- fields_for with accepts_nested_attributes: how to pass a value to a label
- Very strange javascript error
- validates presence of foreign key fails in nested form
- accepts_nested_attributes: undefined method 'association'_attributes