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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:58:43+00:00 2026-05-30T01:58:43+00:00

I am trying to call a page with ajax, but from another server. This

  • 0

I am trying to call a page with ajax, but from another server. This js code runs from bookmark in any page you want and I need to get some data from my server. How could I do this? or maybe connect directly to the database?

I got this code:

$j.getJSON(serverUrl+"isLogin.php?callback=?",function(data){
 //really no need to do anything here, we're just posting data
 //but this will output success
 alert(data);
});

isLogin:

if ($_SESSION['user'] == ''){
     echo json_encode(array("isLogin" => "false"));

} else {
    echo json_encode(array("isLogin" => "true"));
}

How could I make this? I try allot of solutions but none works. This one said no errors, but the alert never appear

Thanks

  • 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-30T01:58:44+00:00Added an answer on May 30, 2026 at 1:58 am

    AJAX (The XMLHttpRequest object) is limited to the same domain for security reasons.

    You have a couple ways to go about this:

    You can use JSONP if your API supports it. This is very similar to your current AJAX approach.
    This is jQuery’s documentation – http://api.jquery.com/jQuery.getJSON/

    Another option is to create a local proxy. This is a little more in depth, but gives you full control.
    Here’s a good article – http://developer.yahoo.com/javascript/howto-proxy.html

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

Sidebar

Related Questions

I'm trying to get an Ajax call from a link in a master page.
I am trying to call one jsp files from Jquery-ajax call. But, I can
I trying to call 2 functions in the same page to submit jquery-ajax at
I'm trying to call ScriptManager.RegisterStartupScript from page A so that when page B loads
I'm currently trying to register a JS function call from a .NET page which
I'm trying to perform an Ajax query from within a Greasemonkey script, but I'm
I'm new for Jquery. I'm trying to call server method from my user control
I am trying to call a Sample API from my JSP using jQuery Ajax,
I'm working on this website, trying to call a function from a C# DLL
I'm trying to get my AJAX call working with the rails 3, but I'm

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.