I have an application where user can see a list of cells. For each cell the user can see two images of the cell as popup menu. The problem is that all images are downloaded when a list is selected and that makes my page very slow. I would like that the image is downloaded only if mouse is rolled-over the link. For information: I’m using DOM popup kit link text
Here the main page and link to popup menu
<div id="span_div">
<span id="cell_link_<%= @cell.cellid %>" class="popup_link" Popup.modal = true><%= @cell.cellname%>
<%= render :partial => cell_popup %>
<%= javascript_tag "new Popup( cell_popup_#{@cell.cellid} , cell_link_#{@cell.cellid} )" %>
</span>
</div>
Here a partial for cell images
<div id="cell_popup_<%= @cell.cellid %>" class="popup popup_draghandle" style="display:none">
<table width="418" border="0">
<tr>
<td width="201" align="center" valign="top">Raw</td>
<td width="201" align="center" valign="top">Repaired</td>
</tr>
<tr>
<td align="center" valign="top">
<% if @full_report == true then%>
<%raw_morph = @raw_morph.last%>
<img src="<%= url_for(:action => jpegfile , :controller => neuronviewer ,:morph_id => raw_morph.morphologyid)%>" alt="" width="200" height="200"/>
<%end%>
</td>
<td align="center" valign="top">
<%if @repaired == true then%>
<%repaired_morph = @repaired_morph.last%>
<img src="<%= url_for(:action => jpegfile , :controller => neuronviewer , :morph_id => repaired_morph.morphologyid)%>" alt="" width="200" height="200"/>
</td>
</tr>
<%end%>
</table>
Anyone have any idea to do that?