cross-domain

Communication between websites

∥☆過路亽.° 提交于 2019-12-11 23:51:28
问题 I'm creating a network of websites that should communicate between themselves, for example to let all of them display an article published on one of them, or display data stored in a database of another subdomain, etc... And this all using ajax for interactivity. Which could be the best (and simplest) way to achieve this? I thought an ajax call could summon a php script that could call another script on another subdomain. Is it the right way? Thanks 回答1: I don't know exactly what you want to

How can I pass value to iFrame with javascript?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 23:48:44
问题 I opened an iFrame in my page and onClick event try to send a value to the textbox of the iframe This is my javascript code <script type="text/javascript"> function TextToFrame() { var frame = frames['frame1']; frame.document.getElementById("u").value = "wallace"; } </script> IFrame loads the page but when I click the Button , it doesn't send any value. It refreshes the main page and iFrame <asp:Button ID="Button1" runat="server" OnClientClick="TextToFrame();" Text="Send Value" /> <IFRAME id=

Lets solve cross-domain ajax, totally on the client, using script tags

吃可爱长大的小学妹 提交于 2019-12-11 22:55:45
问题 I know, there's JSONP, which involves server cooperation to name-space the data. What is bothering me is the fact that the content of script tag src is evaluated , but it's NOT available to read. <script src="http://www.google.com"></script> All we need to figure out is how to namespace the data, that's all. Of course I tried pretty idiotic things with no relevant result (I know this doesn't work, but you can see what I'm trying to achieve): <script>eval('var namespace="');</script> <script

Get http://imgur.com/gallery/hot/page/1.json with jQuery

孤街醉人 提交于 2019-12-11 20:12:44
问题 Hello i try get this json with $.getJSON, also $.ajax(...) but nothing... jQuery.ajax({ url: "http://imgur.com/gallery/hot/page/1.json", type: 'GET', crossDomain:true, success: succ }); always i have errors like XMLHttpRequest cannot load http://imgur.com/gallery/hot/page/1.json. Origin my_ip is not allowed by Access-Control-Allow-Origin. also i tried get jsonp request but also nothing.. jQuery.ajax({ url: "http://imgur.com/gallery/hot/page/1.json", type: 'GET', dataType: 'jsonp', crossDomain

How to add crossdomain.xml in sub directory

别来无恙 提交于 2019-12-11 20:11:08
问题 The spec for cross domain policy files says that you can put a the crossdomain.xml file outside the root through the use of a X-Permitted-Cross-Domain-Policies header. How exactly does one go about doing that? I want to put a crossdomain.xml file in a sub directory (I don't have access to the root). This is from page 11 of the spec: When clients require a policy file, they look at the root by default. A domain should always host a master policy file to enforce its intended meta-policy. If a

Iframe cross domain issue

↘锁芯ラ 提交于 2019-12-11 20:01:50
问题 I want to pass a message from iframe to parent page in every few seconds like: Iframe Domain = www.abc.com Parent Domain = www.xyz.com Have check with: Cross domain iframe issue https://stackoverflow.com/questions/5203741/jquery-cross-iframe-script-loading-ownerdocument-issue Can someone help me on it? 回答1: I just recently helped another person with a very similar concern, passing messages between IFrames. (see Issues with Cross Document Messaging between IFrame & Parent). Using a modified

How do cross domain requests work in IE8?

寵の児 提交于 2019-12-11 19:41:40
问题 How do cross domain requests work in IE8? The target request is to http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true_or_false I tried using $.getJson and $.ajax and they worked for IE9/10 and FF and chrome. However it would not work for IE8. I read some of the posts related to getting XHR working and after enabling the cors flag in ajax settings, I was able to make the call. However, my callback never got invoked. I got it

Phonegap Jquery mobile cross domain ajax request not working

折月煮酒 提交于 2019-12-11 18:51:07
问题 I am trying to make a ajax request from my phonegap app to a serverside code written in php which is on my localhost. I am trying to use the jsonp request. This is my code $.ajax({ url: 'http://localhost/score-tracker/get-groups.php', type: 'GET', contentType: "application/json", async: true, dataType: 'jsonp', crossDomain: true, success: function(resp){}, error: function(err) {} }); But the control does not return either in error or success callbacks. I even have this enabled : $.support

How to access XML hosted as azure blob from azure website

左心房为你撑大大i 提交于 2019-12-11 18:33:20
问题 I'm currently looking into problem: We have a backend application that creates XML files with content and stores them as Azure Blobs (we cannot change this). Blob sample url: http://mytestaccount.blob.core.windows.net We are implementing a webpage that consumes those XML files. Our current solution is static webpage (no iis or any other server required) hosted on the same blob as mentioned XML files. Question 1: Is there a way to redirect a domain name to our webpage hosted currently as blob?

Dojo - Issue loading widget cross-domain

谁都会走 提交于 2019-12-11 18:12:30
问题 I'm working on a project that requires that some custom Dojo widgets (i.e., widgets we have written ourselves) are loaded from another server. Despite my best efforts over several days, I cannot seem to get Dojo to load the widgets. Dojo is loaded from the Google CDN, the widget is loaded from www.example.com, and the website is located at www.foo.com. I cannot post the actual project files (this is a project for a company), but I have reproduced the error with smaller test files. Test.html