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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:05:10+00:00 2026-05-16T08:05:10+00:00

$.get(http://localhost/test.php, (function(data){ alert(data); })) The alert is empty. I’m new to this, and I

  • 0
$.get("http://localhost/test.php", (function(data){
    alert(data);
}))

The alert is empty. I’m new to this, and I can’t see what I’m doing wrong. Help?

  • 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-16T08:05:10+00:00Added an answer on May 16, 2026 at 8:05 am

    It does work with a file:// URL but not http://? I smell same origin policy.

    Are you opening the file with the jQuery in your browser via a file:// URL then trying to fetch via http://? Because your protocol and host have to match when you do Ajax.

    Make sure that you’re opening the file in your browser as http://localhost/index.php and not file://localhost/index.php. Then you should be able to fetch that file via http://localhost/test.php.

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

Sidebar

Related Questions

Here is the url: http://localhost/test.php?id=http://google.com/?var=234&key=234 And I can't get the full $_GET['id'] or $_REQUEST['d'].
Came across this code: <?php require_once 'HTTP/Session/Container/DB.php'; $s = new HTTP_Session_Container_DB('mysql://user:password@localhost/db'); ini_get('session.auto_start') or session_start();
This is what I am trying to accomplish: location.replace('http://localhost:8888/test/index.php?site=' + document.URL); So I need
How to get base url in jQuery? Think I am in http://localhost/test/test_controller/test 's js
I have URL like this: http://localhost/PMApp/temp.htm?ProjectID=462 What I need to do is to get
When I try to go to this url: http://localhost:3000/lessons/18/pages , I get this error:
http://localhost/test/editformquestions.php#?formid=1 And http://localhost/test/editformquestions.php?formid=1 I failed to retrieve $_GET['formid'] in the first one,why? The content
This is my url: http://localhost/framework/index.php echo $_SERVER['REQUEST_URI']; Would output: /framework/index.php But If my url
I am learning to implement restful webservices with Jersey. I always get POST http://localhost:8080/rest/welcome/post
I have the following url http://localhost/user/MyUserName How do I get MyUserName from that url?

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.