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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:52:13+00:00 2026-06-04T12:52:13+00:00

I have a JQuery Mobile app. This app needs to hit a remote web

  • 0

I have a JQuery Mobile app. This app needs to hit a remote web service. When I run the app from my local file system, the app loads fine. But then, when I click a button, I try to interact with the web service. When I attempt to hit the web service, I see an error in the console that says:

XMLHttpRequest cannot load https://www.mydomain.com/myService/myAction. Origin null is not allowed by Access-Control-Allow-Origin

I try to hit the service with the following code:

var vm = getParameters();
$.ajax({
  url: https://www.mydomain.com/myService/myAction,
  type: "POST",
  data: JSON.stringify(vm),
  contentType: "application/json",
  success: action_Succeeded,
  error: action_Failed
});

What am I doing wrong? I tried everything in this post without any luck: XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-Origin.

My app works when I run it via Visual Studio. My hunch is that its running with in a context of a web server at that point. However, I want to deploy this via PhoneGap. Because of that, running within the context of a web server is out of the question. That’s why I figured if I ran it via my local file system and everything worked, I should be good. What am I doing wrong?

Thank you so much!

  • 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-04T12:52:14+00:00Added an answer on June 4, 2026 at 12:52 pm

    Check your config.xml file (if you’re using the Phonegap Build service – otherwise check the .plist file for iOS, AndroidManifest.xml for Android..), and add this line:

    <access origin="*" />
    

    If this works, then you can try to set a more restrictive access rule like:

    <access origin="https://mydomain.com" subdomains="true" />
    

    And on your server side, you’ll need to return this http header:

    Access-Control-Allow-Origin: *
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a mobile web app written using JQuery Mobile, this app retrieves
I have a jquery mobile web app. On my iPhone when I am on
Trying to do a simple web app with jquery mobile. I have put together
I'm building a mobile web app with jQuery Mobile and I have a problem.
I have a website/web app built with jquery mobile that I am trying to
I have an HTML5/jquery mobile web app at http://app.bluedot.mobi . It is used for
I'm building a web app using jquery mobile that will have lots of images
I have a JQuery Mobile app. This app has a page with a select
I have some strange scrolling problems with my PhoneGap (using jQuery Mobile) app: I'm
I have a jquery mobile list. This list is populated with data. I want

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.