Now, it seems like adding link_to_remote or form_remote for this on
EVERY record (and maybe every H,M,L, and ?) is just a waste of
bandwidth. Tiny, yeah, but let’s use this example to help define the
page like upd( num, new_pri ) that would invoke the Ajax updater to call
num and pri would have to be injected into the Ajax call, of course. On
each record, then, I’d only have something with onclick=“upd( 33, 2);”
If you’re going to clean up a mess, using global functions isn’t really going to improve matters all too much is it?
This problem is I’m too new to all this Prototype / Rails stuff to make
it work. How do I inject variables like num and new_pri into the code
generated by prototype? Or is this just an incredibly stupid idea and I
should be flogged?
You just use normal link_to in your rails app (if you want both normal and ajax links on your page, add a “remote” class to your link_to) and then tell nwevents to trigger the href of the link to with an Ajax.Request or something.
Peter De Berdt