Forum: Ruby on Rails calling javascript via "eval(request.resopnseText") help nee

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
786aca6b4728622a57a2c34fb1c9f0cd?d=identicon&s=25 Rich Brant (Guest)
on 2006-01-28 14:50
(Received via mailing list)
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
This topic is locked and can not be replied to.