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

  • Home
  • SEARCH
  • 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 1050663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:48:16+00:00 2026-05-16T16:48:16+00:00

I have a Rails application, and when I have Javascript errors they are not

  • 0

I have a Rails application, and when I have Javascript errors they are not showing in the Firebug console. I have ‘Show javascript errors’ and ‘Show javascript warnings’ selected.

When I insert javascript errors in a basic html file, the errors show as expected.

In the javascript of the Rails app, it only shows errors in rare cases.
For example i can insert nonsense like:

dfghaefb;

and no error is shown in Firebug. But if i insert a space in there Firebug does show the error:

dfgh aefb;

Any ideas? This is driving me nuts.

UPDATE:
Pumbaa80 was right, it’s syntax vs runtime.

So I set up onerror:

onerror=errorHandler;
var error="";

 function errorHandler(errMessage,url,line){
  error="There is an error at this page.\n";
  error+="Error: " + errMessage+ "\n";
  error+="URL: " + url + "\n";
  error+="Line: " + line + "\n\n";
  error+="Click OK to continue viewing this page,\n";
  alert(error);
  return true;
 }

And I have a method with an error:

function initForm() {
    asdfs;
}

And it works when I call it outside of a method:

initForm();

but not in this case:

document.observe('dom:loaded', function() {

    initForm();
}); 

Why is that?

  • 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-05-16T16:48:16+00:00Added an answer on May 16, 2026 at 4:48 pm
    dfghaefb;
    

    produces a run-time error. Those errors may be suppressed by putting an onerror handler on the window or by trapping them in a try/catch in some way. In that case, Firebug won’t show anything.

    In contrast,

    dfgh aefb;
    

    is a syntax error, which is shown in the error console, regardless of try/catch and onerror.

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

Sidebar

Ask A Question

Stats

  • Questions 530k
  • Answers 530k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer you can use GET window.location.href = "http://yourdoamin?value= serialize text variable";… May 16, 2026 at 11:33 pm
  • Editorial Team
    Editorial Team added an answer Well, actually the two are doing exactly the same: Dog.prototype… May 16, 2026 at 11:33 pm
  • Editorial Team
    Editorial Team added an answer In your display code, place $galleryResult['id'] in your form: <input… May 16, 2026 at 11:33 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have created a rails application that has a simple RESTful json API. This
I am new to HighCharts, javascript, and rails. I have a highchart in my
In my rails application, I have a page with a link that execute a
I have a ruby-on-rails application and I'm now wondering why RoR uses Restful Requests:
I have a Ruby on Rails (2.3.5) application and an APE (Ajax Push Engine)
I have a Rails app that is running on a production server with Apache
I have started using jQuery and rails. I have made a simple form that
I have a rails app running on port 3000. The page in question has
I am new to Rails and am just implementing some basic applications. Just starting
We have some JavaScript code that resizes <div/> elements (adjusts height/width/padding/margin etc.) based on

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.