I’m using link_to_remote to populate a div with some data from the db
and then show the div. The problem is that I need to show it
reasonably close to the place where I clicked. As you know, Firefox
passes its event object to each event handler and because the onclick
event is taken by the Ajax call, I don’t have access to the event to
extract the mouse coordinates anytime in the process.
I’m thinking of doing link_to_function instead and then using my own
function to make the AJAX call, but it’s not portable and I don’t like
it. Another solution I’ve thought of is attaching a ‘click observer’
for each link that uses link_to_remote but there could be potentially
many of those – so I’m not crazy about this idea either.
Anybody have better ideas?