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 7938327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:46:50+00:00 2026-06-03T22:46:50+00:00

It should be noted that I am not very proficient at using Firebug, but

  • 0

It should be noted that I am not very proficient at using Firebug, but I haven’t found any errors that explain the following issue.

I have a feed.js.erb file containing the following code:

var $foos = $('<%= escape_javascript(render(@foos)) %>');
$('#container').append($foos);
$('#pagination_button a').attr('href', '<%= feed_path + '?page=' + @page %>');

When this ajax call is made the second time, it appears to fail silently. I see the appropriate response in the Firebug console, but $foos is not altered and subsequently the #container is never appended.

My html page only includes a loading indicator, which it successfully replaces on the first call. The second call is triggered from other javascript (Infinite Scroll).

If it matters, I have noticed that the first call is made with an automatically generated timestamp parameter. After that I am replacing the target url as you can see on my #pagination_button a.

How can I debug this in the browser?

Update: I used ERB to make $foos a dynamic variable ($foos1…$foos2) and noticed that this is also not working. So even though the new @foos are visible in the console’s response, the first line of my javascript is not being evaluated.

  • 1 1 Answer
  • 0 Views
  • 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-06-03T22:46:53+00:00Added an answer on June 3, 2026 at 10:46 pm

    As it turns out, Rails is not processing my second request as JS. More importantly, if the JS raises an exception, it will be converted to plain-text as explained here. Steve also shows how to debug ajax code, effectively answering both of my questions.

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

Sidebar

Related Questions

EDIT following Ben's answer I'm trying to make something that should be very easy
Should one use @property for variables that will be accessed very often, such as
Note: Not a duplicate of Why does Clojure recur think it should only have
Should I use using? Private Sub btntest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Should be easy. I'm adding a button to each table row, that gets information
I think i'm aware of accessibilty but I'm not sure if I understand visibility
I found very confusing when sorting a text file. Different algorithm/application produces different result,
It's important to note that I'm not looking for a rounding function. I am
Just a note : I know that in Java finally block should never throw
I am using a machine on which I do not have root access and

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.