using modules in json (or enabling cross domain ajax) files
I need to display a list of web applications on a different domain. (Both are catalyst for activity sites).
I seem to have two options:
JSONP
I jsonp working on a json file coded hardcoded, but as soon as I tried to put the {module_webapps} in, I realized that BC does not have labels outside of the html files.
This is the json file, I want to get:
() houseLandCallback
{"packages": []}
{module_webapps, 7307, c, 48029}
]}
);
CROSS DOMAIN AJAX
Is it possible to allow both sites to BC to share data?
I know that the whole point of British Colombia is it have a solid server that you cannot change.
Not at the moment no. You can run out of FEED.
Liquid and BC. Is then on the horizon that has more support JSON, etc., while JSOP is not at launch, if all goes well, it can be added down the line.
Tags: Business Catalyst
Similar Questions
-
How can I use ExternalInterface.addCallback("IsStatic",IsStatic) when using javascript server access (html) of server B (swf)? coz it showing error?
Server A
192.168.0.10/xxx/example.html
===========
< object classid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
ID = "MGSInsurances1" width = "960" height = "600".
codebase =" http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" > "
"" < param name = "movie" value = " http://192.168.0.22/MGS/flex/MGSInsurances1.swf" / >
< param name = "quality" value = "high" / >
< param name = "bgcolor" value = "#869ca 7" / >
< param name = "allowScriptAccess" value = "always" / >
"" < embed src = " http://192.168.0.22/MGS/flex/MGSInsurances1.swf" quality = "high" bgcolor = "# ca 869, 7.
width = "960" height = "600" name = "MGSInsurances1" align = "middle".
play = "true".
Loop = "false".
quality = "high".
allowScriptAccess = "always".
Type = "application/x-shockwave-flash".
pluginspage =" http://www.adobe.com/go/getflashplayer_fr" > "
< / embed >
< / object >
< script language = "javascript" >
window. MGSInsurances1 = document.getElementById('MGSInsurances1');
< /script >
Server B
192.168.0.22/mgs/Flex/MGSInsurances1.swf
==================
Security.allowDomain("*");
If (ExternalInterface.available)
{
ExternalInterface.addCallback("IsStatic",IsStatic) ("onchange", onchange);
ExternalInterface.addCallback("IsStatic",IsStatic) ("datachange", datachange);
}
but javascript Error shows "Unknown name", how can I solve this problem? urgent! Anyone know this?I solved it! because I did not restart my server again! Again not error! Sorry to annoy everyone.
-
load the XML file field Companion without cross-domain policy file
Hello.
Assuming that there are two areas companions on the same server: /public_html/domain1.com and /public_html/domain2.com
I'm trying to load the XML from domain2.com in domain1.com without using a cross-domain policy file (since it does not work with xml files in my case).
So the idea is to use a php file to load XML and read it back to Flash.
I found an interesting scripts that seems to do the job, but unfortunately I can't make it work. In my opinion, there is somewhere with AS3 part problem. Please take a look.
Here's the AS3/PHP scripts:
AS3 (.swf in www.domain1.com):
location of the xml file you want to load, full http address
var xmlLoc:String = " " http://www.Domain2.com/MyFile.XML ";
location of the php xml grabber, regarding the .swf
var phpLoc:String = "loadXML.php";
var xml;
var loader: URLLoader = new URLLoader();
var request: URLRequest = new URLRequest (phpLoc + "? location =" + escape (xmlLoc));
loader.addEventListener (Event.COMPLETE, onXMLLoaded);
loader.addEventListener (IOErrorEvent.IO_ERROR, onIOErrorHandler);
Loader.Load (request);
function onIOErrorHandler(e:IOErrorEvent):void {}
trace ("there was an error with the xml file" + e);
}
function onXMLLoaded(e:Event):void {}
trace ("RSS feed has been loaded");
XML = new XML (loader.data);
/ / string value, because it is passed from php as object
XML = XML (xml.toString ());
xml_txt.text = xml;
}
PHP (loadXML.php to www.domain1.com):
<? PHP
Header ("Content-type: text/xml");
$location = "";
{if (isset($_GET["location"]))}
$location = $_GET ['location'];
$location = urldecode ($location);
}
$xml_string = getData ($location);
return the url encoded Flash vars
echo $xml_string;
Loops of a URL and returns
function getData ($query) {}
/ / create resource curl
$ch = function curl_init();
/ / cURL url
curl_setopt ($ch, CURLOPT_URL, $query);
Set some required params for the use of CURL
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
Execute the loop works and decode the returned JSON data
$result = curl_exec;
return $result;
/ / Close the curl resource to free up system resources
curl_close ($ch);
}
? >
I think you might be right about / permissions on the server for php settings. Unfortunately I'm not allowed to adjust.
So I wrote my own script - this time I used the path instead of the http address of the XML file. It works fine in my case.
Here it is:
XML file on domain2.com:
SWF on domain1.com:
var imagesXML:XML;
var variables: URLVariables = new URLVariables();
var varURL:URLRequest = new URLRequest ("MyPHPfile.php");
varURL.method = URLRequestMethod.POST;
variable = varURL.data;
var MyLoader:URLLoader = new URLLoader;
MyLoader.dataFormat = pouvez;
MyLoader.addEventListener (Event.COMPLETE, XMLDone);
MyLoader.load (varURL);
function XMLDone(event:Event):void {}
var imported_XML:Object = event.target.data.imported_XML;
imagesXML = new XML (imported_XML);
MyTextfield_1.text = imagesXML;
MyTextfield_2.text = imagesXML.image [0] .attribute ("thumbPath"); reference sample to assign "thumbPath' of the first item
}
php on domain1.comfile:
<>
$xml_file = simplexml_load_file('.. /.. / /galleries/gallery_1/MyXMLfile.xmldomain2.com'); Directory of XML file on the same server
$imported_XML = $xml_file-> asXML();
Print "imported_XML =". $imported_XML;
?>
Concerning
PS: for those who have read the foregoing: the first and the second script works but you need to test which one is best for your situation. The first script will work also between two domains located on different servers. No. cross necessary domain policy file.
-
Cross domain AJAX calls work on browser, but not on ripple/Simulator
The question I faced is I call of cross-domain ajax using jQuery for the facebook site using an access token. This call works on Chrome and Firefox, but fails on the Simulator and ripple. I have setup my file config.xml with the proper access flags.
My related code is below (cut).
var fbData = { access_token: _fbToken }; var fbUrl = "https://graph.facebook.com/me"; $.getJSON(fbUrl,fbData, function(data){ // Some code here });
I also tried using the extended method of $. ajax() and JSONP specifying the data type, but it is the same problem.
I looked in the Inspector on the drive and I see that no host header is set, but Chrome or Firefox will automatically fill "Host: graph.facebook.com" in the request header. I wonder if this is the problem?
Demand is just stuck as 'pending' in the network tab.
JSONP requests in jQuery, you cannot alter the headers (so not in available beforeSend setHeader).
I don't have the chance to test it on the device but wonder if other people have faced this problem.
Well, for those who falls on this issue, the problem does not occur on the device (AFAIK). I ran on a device OS6 and things were good to go.
-
Will of cross domain policy file work with http - &; gt; HTTPS
I received the error message following 'security to access the url error' even though I've already placed the policy file on the server that hosts the service. Is it because the site of my Flex uses the HTTP protocol and the data server using the HTTPS protocol. Is there a way around this problem. Thank you!Hi arnoldchang,
in the first place, I quite agree with you that the crossdomain.xml thing is annoying.
I Don t think you use a socket policy file if you want to connect to a Web service, but you may need to change the crossdomain.xml.
Please give a look to this LINK
or for German users (this LINK)
an example of a modifed crossdomain.xml looks like this:
Best regards
Kcell -
PB to download the different domain xml file
Hello
I want my flash site to convert currencies.
This is why I want to get the rates of Exchange from the internet.
Initially, I wanted to do this by using web services, but the free one I found:
http://www.webservicex.com/CurrencyConvertor.asmx?op=ConversionRate
does not work properly (loading problems?)
So I decided to use another way by getting my rate from the RSS file:
http://www.CurrencySource.com/RSS/EUR.XML
Everything is ok, I had the rates I am interested in the analysis of the RSS.
But everything is ok when I test locally, when I put my file on my hosting server, rates cannot be recovered more, it seems that if there is a connection problem.
Is there a security problem? Can someone help me?
I've heard of cross-domain policy file, but I can not put such a file on a server that I do not know
i.d., is to put the file on the server hosting http://www.currencysource.com/rss/EUR.xml, I can't apply this...
Thanks for your helpThanks Aaron!
That's exactly what I did:
http://KB.Adobe.com/selfservice/viewContent.do?externalId=tn_16520&sliceId=2
... and it works ;) -
Problem in flex with cross-domain to script using GET method
Hello
I have a strange problem in Flex, the appeal of scripts located on other servers, using the GET method.
When I want to connect with a HTTPService in Flex for a script that is located on a different domain than the flex application, I place a crossdomain.xml in the root of the server script:
<? XML version = "1.0"? >
<!- http://www.script-domain.com/crossdomain.xml ->
< cross-domain-policy >
< allow-access-from domain = "www.app-domain.com" / >
< / cross-domain-policy >
The problem is that when you use the GET method to the crossroads, it seemes that the flashplayer adds search for the crossdomain.xml at the end of the query string. With a url snooper I can that the requested url, and when the player seeks the crossdomain.xml, it does so in a strange way:
http://www.script-domain.com?var1=val1 & var2 = val2/crossdomain. XML
It seems to use the url + querystring as a url and puts the crossdomain.xml at the end of the query string, which is NOT the location of it, and the application fails with a runtime error message.
Looking for the crossdomain.xml should look like this:
http://www.script-domain.com/crossdomain.XML
If I use the POST method instead, it works fine, but I would like to be able to use the GET method.
Any suggestions?
/ JesperProblem solved!
For correct work crossdomain checking, you must ask the script remote itself and not only the remote folder:
-
More recent emulator ripple to not cross-domain proxy
My apologies if this question has already been answered, but I just took the time to install the last ripple emulator after much frustration with earlier versions... and now, after following these instructions to the 't', I still can't use the emulator again because it will not allow the domain ajax calls...
Can someone enlighten me please what I need to do to make this work. I can provide any other information is needed to help solve this problem.
Thank you
OK, so maybe my modified shortcut icon not been fired currently, so I manually chrome.exe launched from the command line with the following parameters:
-enable-extensions-disable-web-security
and it works.
Thank you.
-
Is this multidomain or cross domain SSO?
Hi all
There are two servers in the intranet.
Server1.test.NET
Server2.test.com
So we have areas cookie: test.net & test.com.
There are several areas SSO or cross domain SSO?
Thank you
Published by: 859875 on May 27, 2011 06:57Hello
It's okay... people usually merges between these two. However, it's not his fault so many books and online references also count them in the same compartment. His words using the correct terminology.
With your question, test.net and test.com will be the example of sso multdomain in most cases with quite obvious reason that for most, both are in the same intranet.
The choice is still flexible, if it isn't within the intranet and reckoned to cross the field (However, this case is quite rare).Yet once, multi domain and cross terminologies of the field are against the logical concepts and not fixed with examples. You could make that your decision based on your example.
Hope this helps,
-
I'm having a problem with some pictures of the area that I'm loading in Flash. I have all subdomains of the calling area (e.g. "*.") sitewithswf.com') in the policy file cross-domain in the domain that hosts the images I am trying to load in the root. I use Charles to check that all load in properly. The crossdomain.xml file from the domain that hosts the images IS to take and it contain the field making call (well well, with characters generic subdomain) and I even see the image is also getting Charles requested and returned through, as well as a response to "200" for the load HTTP_STATUS. However, my COMPLETE function is never called. I wrapped the load() with a try and it does not fail, and my IO_ERROR is not called. If for some reason, all the world is OK with my SWF get these images, but the COMPLETE is never called. Any ideas?
You are welcome.
-
cross-domain-policy does not work
I get an error message:
Error #2048: security sandbox violation: http://www.m.com/p/bin-debug/main.swf Cannot load data from http://rateservice.m.com/rateservice.svc/ .
My cross-domain file to http://rateservice.m.com is :
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*.m.com"/>
</cross-domain-policy>using m as alias
Please tell us how do I solve this problem, as it should work. I did a test of firbug and the cross domain is to be found by the eyelashes of firebug
1. There is no closing tag:
http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"/>
-
I've developed a Flex application for a while, using HTTPService to GET XML objects to and remote XML MESSAGE to a web service. Don't launch the application on my local machine, I had no security problems. However, I just wore the first instance of the application on our server and I started getting security errors (faultString = "Security error to go to the url", faultDetail = ' Destination: DefaultHTTP "").
I'm sure that there is a problem between the areas, and I'm communicating with those responsible for the server to get a security policy file that is added to the root of the server. When I was communicating with them, however, I could not explain clearly why they the server due to add a policy file security for what is mainly a problem of the client security.
- Am I right that it is a cross-domain issue?
- Why did I have not this error when I spear the app of my file system?
- Why is the server responsible for security rather than the client policies?
Thank you.
I think that is the point of having a crossdomain file, so nobody can take your SWF, the hack file and mess with their data.
If you are into Flex Builder, you create the SWF file.
Once its on the web, the crossdomain file protects the data and your SWF of piracy.
If this post answers your question or assistance, please mark it as such.
-
Goal
My main SWF (let's call it "TheShell.SWF") needs to load another SWF (call it a "TheContent.SWF") using loadMovie cross-domain.
Problem
I added the following line to the first picture of TheContent.SWF:
System.security.allowDomain ("' http://www.example_shell_host.com ' ");
However, when I opened "TheShell.SWF" on another area if fails to pull in the SWF file.
I tried specifying the exact path ("' http://www.example_shell_host.com/creative ' "), but this does not work either. Nor is the use of the "*" credits.
What I am doing wrong? Do I need to add any code to 'TheShell.SWF '?
See you soonJust a quick update.
After exhausting all other options, I moved the files of two new servers and they worked very well.
Thank you
-
AT & T changed their design of the homepage, and I liked the old one. A way to create my own homepage in Firefox using modules for content that I prefer? I liked the modules which gave me a variety of sources of news, finance, sports, weather, calendar, etc... It also allowed me to use a background of my own source. Finally, he allowed me to resize the modules I needed. I would like to be able to replace the new AT & T with my own homepage. Thank you.
Maybe http://www.netvibes.com/
-
in my messenger when I go on msn and hotmail to see my hotmail Messenger it says: this module requires scripting be enabled in my browser all solutions?
Hello
Please repost your question in hotmail in the hotmail link below forums
http://windowslivehelp.com/product.aspx?ProductID=1
____________________________________________________________
they will help you with your questions/problems Messenger when repost you the link below in the Messenger forums
Maybe you are looking for
-
COMMENT DESISTALLER ADVANCED MAC CLEANSER
Mac cleaner has been installed on mac of my book with a day of ADOBE Flash player. Then I got invitations to buy MAC software ADVANCED CLEANER, what I've done. I have activity license key with the help of a technician of this ADVANCED MAC CLEANER ser
-
Hey I got an iPad 2 Air in December 2014 and then define security issues. Just got an iPhone 6 recently and tried to update my profile of security which asked me to answer audit questions. Responses to the I forgot even if I wrote em down somewhere,
-
Re: Taskbar of function will not work on Windows 7
Hello I've upgraded to Windows 7 from Vista, since that appear in the task bar I press FN low does ' t. I Qosmio G30 Any help appreciated,
-
SMU FlexRIO DMA FIFO host read the FIFO overflows broadband bandwidth/DMA issues
I'm working on an application that uses 2 modules FlexRIO, and 2 LVDS digital I/O adapters. I'm driving each of the SDC A/SDC B ports on LVDS 16-bit data at 50 MHz adapters. The FlexRIOs are expected to receive the data and write down them on four
-
Cannot turn off Wifi and bluetooth
Hello. I have recently installed windows 8 pro 64 bit on my HP Pavilion laptop 1322tx g6. I downloaded and installed the drivers from http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4132&lc=en&cc=us&dlc=en&sw_lang=&product=5227... . Everything