Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4122572
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:29:56+00:00 2026-05-20T23:29:56+00:00

I have a form that looks similar to this – <Form (Unique Form ID)

  • 0

I have a form that looks similar to this –

<Form (Unique Form ID) (Common Form Class)>
Some Value: <select_list_element> <submit_button> <image_tag_for_progress_indicator>
<Form Close Tag>

Pretty straight forward – repeat 20x for the page. The basic purpose is to let users go down the form list, update values on a one off, and then move on.

To make it a little nicer, I’m doing the submission via AJAX, and wanted to allow for indicating things were updating. However, I can’t seem to get it to work right – here’s the javascript I’m using:

$('(Common Form Class)')
.bind('ajax:loading', function(){ $(this).find('(image tag class').attr('src', '(spinning gif)'); })
.bind('ajax:success', function(){ $(this).find('(image tag class').attr('src', '(success gif)'); })
.bind('ajax:failure', function (){ $(this).find('(image tag class').attr('src', '(failure gif)'); })

I’m 99% positive that I’m getting the use of “this” wrong – but I can’t seem to debug why.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:29:56+00:00Added an answer on May 20, 2026 at 11:29 pm

    Sadly, (or not sadly?) the bug was not with my code. The rails guys decided to update the UJS events, and now “ajax:loading” is no longer correct – it’s now “ajax:beforeSend”, and all the tutorials out there are wrong.

    Hope someone sees this and is able to correct their own code.

    Here’s a tutorial that has it correct:

    http://www.alfajango.com/blog/rails-3-remote-links-and-forms/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that looks kind of like this: <div> <div class=contact> <h1>Person's
I have a form that looks like this: class SampleForm(forms.Form): text = forms.CharField(max_length=100) In
I have an XML document (an InfoPath form) that looks similar to this: <my:ClientMaintenance
I have a form that looks like this. <form action=index.php method=post> <select name=dropdownOption> <option
I have a simple form that looks like this: <%= simple_form_for @study,:url => studies_path,
I have a page that looks like this: Head and body tags... <form runat=server>
I have a form that looks like this: <form method=post id=aodform> <label for=a>Animal:</label> <input
I have a form that looks like this: <form id=addClassesToDoc action=> <table id=classesTable style=border-collapse:
I have a form that looks similar to the following (simplified for brevity): PRICING_PATTERN
I have a simple form that looks like so <% remote_form_for post, :url =>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.