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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:20:02+00:00 2026-06-18T02:20:02+00:00

I am a noob to javascript and specially Backbone.js I am following this tutorial

  • 0

I am a noob to javascript and specially Backbone.js
I am following this tutorial and tweaked the models and urls to my own Rest Services(JaxRS). However, on running the app in browser (Chrome) gives me the following error XMLHttpRequest cannot load http://localhost:1232/abc. Origin null is not allowed by Access-Control-Allow-Origin

On searching for some solutions over this error,

  1. i read on a post on SO to start the chrome with the parameters --allow-file-access-from-files –
    However, i am not sure about this method. And neither i could try this due to some reasons.
  2. Also i read that in plain javascript, such kind of issues are usually handled using an xmlDomainObject. But this is not a case with backbone.

So what i am looking for, is some method by which i can solve the issue through backbone itself. Also i dont understand, why this kind of issue was not addressed in any of the tutorials on using backbone with RestApi

  • 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-18T02:20:03+00:00Added an answer on June 18, 2026 at 2:20 am

    This has nothing to do with Backbone specifically. You are loading the page with a file:/// URL and the problem is an AJAX Cross Origin request.

    There are ways around it – you could load your web pages through your server which is running the REST services. Alternatively, you could allow cross origin requests. I’ll let you search for how to do that.

    EDIT
    If you are developing a PhoneGap application, you will not have the issue once you actually run the application since it will not complain about cross origin requests. At that point it is a local app so the request is not cross-origin.
    The way to get around that at development time is the –allow-file-access flag which you said you could not get to work. You need to make sure to close any other open Chrome windows and then start a new instance with that flag.

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

Sidebar

Related Questions

First of all, I'm a JavaScript noob and even noober in Backbone.js. I'm following
Total noob here with javascript. I'm trying to alter a function. This is the
Ok im new to javascript and Unity so this is clearly a very noob
Javascript noob here (I'm assuming I will need Javascript to solve this). I need
I'm a javascript noob, and I don't understand why this works: $().load('/my/url/', {my:data, more:data},
This will sound very noob, but I'm new to HTML/javascript/php, and so far I've
I am a javascript noob and I need help with this problem ! On
Little help for a javascript noob please... I have this in a .js file
I'm a complete JavaScript noob. I am using this right now: $(function() { $(#tabs).tabs({
javascript noob here. So I'm trying to use this s3 uploader jQuery example here

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.