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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:18:27+00:00 2026-05-16T10:18:27+00:00

Heh, I’m using jQuery AJAX Call to pull data from a self hosted webservice

  • 0

Heh,
I’m using jQuery AJAX Call to pull data from a self hosted webservice (same domain), but it always return 0, which indicates a cross domain problem. But this shouldn’t be a problem.

Any suggestions how to fix this? Thanks!

Website running my Script

http://www.mysite.com/facebook/el_login   

My AJAX Call:

var data = 'username=' + username.val() + '&password=' + password.val()
$.ajax({  
             url: "http://www.mysite.com/api/v01/account/exists.json",   
             type: "GET",        
             data: data,       
             cache: false,  
             complete: function(transport) {
              if(transport.status == 200) {
                  alert('Success');
              } else {
                  alert('Failed ' + transport.status );
              }
           }

         });  
  })

Firebug Request Headers:

Request Headersview source
Host    www.mysite.com
User-Agent  Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
Accept  */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive  115
Proxy-Connection    keep-alive
Content-Type    application/x-www-form-urlencoded
X-Requested-With    XMLHttpRequest
Referer http://www.mysite.com/facebook/el_login
Cookie  sessionid=xxx

Edit:

Okay, it seems that AJAX Calls on static sites (same server) are working. My Webservice Backend is based on Django, Apache2 and mod_wsgi .. maybe there’s a reason why this fails.

  • 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-16T10:18:28+00:00Added an answer on May 16, 2026 at 10:18 am

    Okay, after some hours of Starcraft 2 figured it out.
    I wired my Submit Button with

    $('#submit').click(function ()
    

    which seem to create some problems with jQuery Ajax

    Solution:
    Use the “old” style to wire up your ajax call.

    <input type="button" value="Submit" id="submit" onClick="sendLogin()"  />
    

    and

    function sendLogin() {  
      var query_data = { username:  'test', password:  'test'};
    
      $.ajax({  
                 url: "http://www.mysite.com/api/v01/account/exists.json",   
                 type: "POST",        
                 data: $.toJSON(query_data),       
              dataType: 'application/json',
              contentType: 'application/json',
                 complete: function(transport) {
                 if(transport.status == 200) {
                      alert('Success');
                  } else {
                      alert('Failed ' + transport.status );
                  }
               }
             });  
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Heh, I'm using cf.insert(uuid.uuid1().bytes_le, {'column1': 'val1'}) (pycassa) to create a TimeUUID for Cassandra, but
Pardon the pun in my title (heh) but this is seriously driving me nuts!
New to whole this jQuery (and javascript altogether, heh) and so far it's been
I have been trying to learn from reading tutorials online and stuff but I
I'm trying to create a variable length function (obviously, heh) in C++, and what
Is it possible to capture all the sound from a computer and have it
Heh, that's something that many plugin authors do without needing help, isn't it? :)
I have an issue, heh. I'm doing some calcs with bitcoins in PHP. When
I've got a drupal site that gets low traffic, but has tons of new
I've seen several questions about password protecting pages, but none of them seem to

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.