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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:38:54+00:00 2026-06-14T21:38:54+00:00

I’m trying to access a REST Web Service from a HTML/JavaScript application. I’m accessing

  • 0

I’m trying to access a REST Web Service from a HTML/JavaScript application. I’m accessing both the web application and the Web Service via Apache HTTPD 2.2. The Web Service GET method does work (executes and returns data) when called directly in a browser. The Web Service never receives the request when the call is attempted from the web application.

The web service URL is

http://127.0.0.1/pbws/all/

The web page that is calling it is

http://127.0.0.1/~myusername/phonebook/

I don’t believe my problem is the Same Origin Policy as explained on Wikipedia ( http://en.wikipedia.org/wiki/Same_origin_policy ) I’m using the same host, protocol and port for both the web application and the called Web Service.

The call that is failing is:

getAll = function (callback) {
   $.ajax({
       type: "GET",
       url: "http://127.0.0.1/pbws/all/",
       dataType: "json",
       async: true,
       success: function (data, textStatus, jqXHR) {
          callback(data);
       },
       error: function (jqXHR, textStatus, errorThrown) {
          console.dir(jqXHR);
          alert('getAll error: ' + textStatus);
       }
   });
};

The success is never called, only error. With a break point set, jqXHR doesn’t contain any helpful information that I can see, textStatus = “error” and errorThrown is blank. The Chrome Developer Tools/Network tab shows the status as “(failed)”.

I’ve tested this with both Chrome 23 and Firefox 16 on Windows 7. Any ideas as to what the problem can be or how to debug this further?

  • 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-14T21:38:56+00:00Added an answer on June 14, 2026 at 9:38 pm

    It was appcache that caused my jQuery Ajax calls to fail. With the appcache directive commented out in index.html the REST WS calls are working fine.

    I’m now testing the suggestions in How do i allow json requests when using HTML5's appcache feature?

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

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to render a haml file in a javascript response like so:
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.