Forum: Ruby on Rails JavaScript Prompt and link_to_remote

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Nickolay K. (Guest)
on 2006-05-05 18:05
(Received via mailing list)
Hi all,

I would like to get one of the parameters for a link_to_remote with
JavaScript prompt. So far I have this:

   :before => "$name = prompt('Name?')",
   :url => { :action => 'add_child', :id => node, :name => XXX },
   :update => "node_list_#{}",
   :position => 'top',
   :complete => visual_effect(:highlight, "node_list_#{}")

I get prompted for the name. How do I add it to the parameter list,
i.e. what do I have to put in the place of XXX on the third line above?

Many thanks in advance,
This topic is locked and can not be replied to.