Using image with submit_to_remote

How can I give an image to submit_to_remote .I could successfully do
it with link_to_remote as below…But the same not working with

<%= link_to_remote( image_tag("/images/cancel.png", {:alt =>
‘Cancel’, :class=>“noborder”,:title=>“Cancel”}),
{:update => “search_contact_div”,
:url => {:controller => ‘admin’, :action =>
) %>

                         Please help

Thanks in advance

Sijo Kg wrote:

                          )  %>

                         Please help

Thanks in advance

Posted via

it should be something like this…

<% form_remote_tag(:url => { :action => :foo}, :complete =>
“do_some_cool_ajax(request);”) do %>
<%= image_submit_tag(image_url)%>
<% end %>

This is sad to say, there is no direct way of image or file uploading
using form_remote_tag or link_to_remote.
For that we have different way to do.
This link will really help ajax image or file upload, uses iframes…
go through this

Thanks for the reply.But What I need is not ajax file upload .Use
an image as a title with the submit_to_remote instead of text title…I
could do it with link_to_remote :submit option now.(For that i had to
change all my code using submit_to_remote with link_to_remote).But would
like to know how can i apply it with submit_to_remote


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs