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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:28:20+00:00 2026-05-16T11:28:20+00:00

We are providing a snippit of HTML that our client can embed on their

  • 0

We are providing a snippit of HTML that our client can embed on their website to make a callback to our API. This HTML is a simple form and a Javascript file hosted on our server.

This is what the client hosts on their website (clientsite.com):

<script type="text/javascript" src="http://mysite.com/webcallback/callback_script.js"></script> 
<form onsubmit="makeCallback();return false;">
<input id="myInput" type="text" />
<input type="submit" value="Go" />
</form>

When makeCallback is called, the script hosted on mysite.com does the following:

var xhr = new XMLHttpRequest();
xhr.open("GET", "http://mysite.com/api/callback.php");
xhr.send();

Notice that the domain of the script and the domain of the XHR request are the same, but the HTML which hosts the form and the script tag is on clientsite.com.

This works fine in FF and Chrome, but in IE I am getting an access denied error. I imagine it has something to do with the same-origin-policy but I am trying to understand why this works in FF and Chrome but not IE. Is there any way to get it to work in IE?

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-16T11:28:21+00:00Added an answer on May 16, 2026 at 11:28 am

    The included script is executed in the scope of the page that is including it, not in a scope of it’s own. Therefore your code is requesting from a different domain.

    The browsers that allow this request have a more relaxed version of the cross-domain restrictions.

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

Sidebar

Related Questions

In a module development (webtv) I am providing a generic block that can be
When providing a link to a PDF file on a website, is it possible
We are look at providing a method for our non-technical users to edit XML
I noticed that Google maps is providing directions in my local language (hungarian) when
I have an xml file providing data for a datagrid in Flex 2 that
What's your preferred method of providing a search facility on a website? Currently I
Can I have a custom service providing the storage of the models I use
Can anyone explain why this code gives the error: error C2039: 'RT' : is
We have a web application providing a service using a simple REST interface (GET/POST
Providing that I have the following on: TeamGamesDao Class: public function listOfTeams() { $select

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.