Using image with submit_to_remote

Hi
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
submit_to_remote

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

                         Please help

Thanks in advance
Sijo

Sijo Kg wrote:

                          )  %>

                         Please help

Thanks in advance
Sijo

Posted via http://www.ruby-forum.com/.

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 %>

Hi,
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
http://khamsouk.souvanlasy.com/2007/5/1/ajax-file-uploads-in-rails-using-attachment_fu-and-responds_to_parent

Hi
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

Sijo

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