Invoking a remote (AJAX) action via double click

I have a list of images on one of my pages, and I would like for the
act of double-clicking on any of them to do a remote request to an
action. In this case, I’d like to pop up a redbox that is a dialog
about the item I clicked on. I found some example code like this:

<%= image_tag "image.jpg",
    :class => "image",
    :ondblclick => "window.location.href = \"#{url_for(:controller

=> ‘foo’, :action => ‘bar’)}";"
%>

But this will forward the window to the new page instead of making an
AJAX request. Any ideas?

Aubrey