On Thu, Feb 24, 2011 at 2:56 PM, Sai Babu <[email protected]> wrote:
> Problem:
>
> View Code:-->
>
> <% form_remote_tag :url =>
> get_reports_backend_billing_billing_reports_path,:update => "reports",
> :complete => "Element.hide('../images/spinner.gif')", :loading =>
> "Element.show('../images/spinner.gif')" do %>
> <label>
> Select Status:
> </label>
> <%= select_tag
> "status",options_for_select(Report::STATUS.collect.insert(0,'')) %>
> <%= submit_tag 'Get Reports' %>
> <% end %>
>
>
There's something wrong with your :loading and :complete arguments. I think
Element.hide and Element.show
expects an element id. change it to
:complete => '$("spinner").hide();'
:loading => '$("spinner").show()'
then add this where you like the image to show
image_tag '/images/spinner.gif', :id => 'spinner'
> Controller code:-
> def reports
> reports = Report.find_reports(params[:status])
> @reports = reports.first
> if request.post?
> render :update do |page|
> page.replace_html "reports_table",:partial => 'reports'
> end
> end
> end
>
>
> Here form is working fine when i am selecting status .. but when i click
> on submit spinner image is not coming ...
>
> Suppose if i am using :disable_with in the submit_tag it is giving RJS
> error.
>
> Why?
> Could any help me!!!!!!
>
> Thanks in advance
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.