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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:14:42+00:00 2026-05-31T07:14:42+00:00

Possible Duplicate: Why is cross-domain Ajax a security concern? I’m having a huge issue

  • 0

Possible Duplicate:
Why is cross-domain Ajax a security concern?

I’m having a huge issue with jQuery. I’m trying to get jQuery to load HTML that gets generated from a PHP page on a remote web server. But whenever I try to run this locally, nothing happens at all. However, for whatever reason, when its on my web host, it’ll run just fine.

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=Unicode" />
        <title>Decisive Shoutbox</title>
        <style type="text/css">
        body
        {
            margin: 0;
            width: 288;
            height: 160;
            font-family: verdana;
            font-size: 20px;
        }
        #gadgetContent
        {
            height: 160;
            overflow: auto;
            vertical-align: middle;
        }
        .shout
        {
            font-size: 8px;
        }
        .date
        {
            font-size: 6px;
            font-color: #010101;
        }
        </style>
        <link href="flexcrollstyles.css" rel="stylesheet" type="text/css" />
        <script type="text/jscript" src="scripts/flexcroll.js"></script>
        <script type="text/jscript" src="scripts/jquery.js"></script>
        <script type="text/jscript" language="jscript">
            $(document).ready(function() {
                $.get("http://decisive-media.net/gameguy/gadgets/shouts.php", function(data) {
                    $('#gadgetContent').html(data);
                    //fleXenv.fleXcrollMain('gadgetContent');
                    alert("done");
                });
            });
        </script>
    </head>

    <body>
        <div id="gadgetContent">
        </div>
    </body>
</html>
  • 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-31T07:14:43+00:00Added an answer on May 31, 2026 at 7:14 am

    Browsers restrict ajax calls to the same origin for security reasons prohibiting you from connecting to remote servers on a different domain than your web page. You can read about the same origin policy on MDN.

    A potential work-around is JSONP which accomplishes a request using <script> tags which are not subject to the same original policy, but it requires server cooperation to implement JSONP because it has to generate the right kind of response to work from a <script> tag.

    I have a web component I’ve built (an HTML5 slideshow that queries a server via ajax to get the list of slides) that I test locally and run on the web. When it’s being tested locally in my test environment (HTML file on my hard disk), I use JSONP to fetch the data from the remote server to get around the security limitations, but when it’s being run in the real environment, I use regular ajax and my app automatically detects which is needed based on the environment.

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

Sidebar

Related Questions

Possible Duplicate: JQuery ajax cross domain I need to load content from another websites
Possible Duplicate: Cross-Domain Requests with jQuery $(function () { (function getFeed() { $ .get('http://feeds.bbci.co.uk/news/world/rss.xml')
Possible Duplicate: Cross-domain XHR/AJAX : a possible workaround? I tried to do a xmlHttpRequest
Possible Duplicate: Cross-thread operation not valid I am trying to close the base of
Possible Duplicate: Getting Cross-thread operation not valid Cross-thread operation not valid I am trying
Possible Duplicate: WPF and cross thread operations I am having trouble with a window
Possible Duplicate: How to change style of iframe content cross-domain? Hi everybody. Is it
Possible Duplicate: Cross-browser window resize event - JavaScript / jQuery Jquery flash of unstyled
Possible Duplicate: How to embed a web browser control in a cross-platform application? I'd
Possible Duplicate: Cross Platform C library for GUI Apps? Is there any crossplatform GUI

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.