Comments on: Setting up your first Socket https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/ Cross-Domain Messaging made easy Thu, 20 Apr 2017 18:47:42 +0000 hourly 1 https://wordpress.org/?v=4.9.34 By: oyvind.kinsey https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1601 Thu, 20 Apr 2017 18:47:42 +0000 http://easyxdm.net/blog/?p=56#comment-1601 Better late than never?

provider/consumer is the nomenclature for iframe/host, so the parent will always be the consumer, and the iframe will always be the provider.

easyXDM is fully bidirectional, so as long as you have code running in both windows, you can expose/call methods in any direction. See the RPC examples for more on this.

]]>
By: fsantiago https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1592 Tue, 30 Aug 2016 07:12:00 +0000 http://easyxdm.net/blog/?p=56#comment-1592 Hi Sean,

Thank you for this great tool.

Is it possible for an to invoke methods in the parent window with easyXDM?

The parent window would be the provider and the iframe the consumer.

Kind reagards

]]>
By: Godwyn https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1585 Tue, 29 Jul 2014 02:34:00 +0000 http://easyxdm.net/blog/?p=56#comment-1585 this is the log on my console;

localhost – 02:31:32.757: easyXDM present on ‘http://localhost/easyXDM/iframeIndex.html easyXDM.debug.js:960

localhost – 02:31:32.763: easyXDM.Socket: constructor easyXDM.debug.js:960

localhost – 02:31:32.764: {Private}: preparing transport stack easyXDM.debug.js:960

Uncaught Error: url is undefined or empty easyXDM.debug.js:323

localhost – 02:31:32.764:{Private}: firing dom_onReady easyXDM.debug.js:1005

localhost – 02:31:32.765:… deferred messages … easyXDM.debug.js:1005

localhost – 02:31:32.765:easyXDM.Socket: constructor easyXDM.debug.js:1005

localhost – 02:31:32.765:{Private}: preparing transport stack easyXDM.debug.js:1005

localhost – 02:31:32.765:… end of deferred messages … easyXDM.debug.js:1005

Denying load of chrome-extension://ijlibpgjojobipinhbmalkgonbchckpp/jquery-1.10.2.min.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension. iframeIndex.html:1

]]>
By: Godwyn https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1584 Tue, 29 Jul 2014 02:24:00 +0000 http://easyxdm.net/blog/?p=56#comment-1584 Hi Sean, I am having problems connecting the provider to the consumer and re-sizing the iframe. I keep getting the same error “Uncaught Error: url is undefined or empty” when I log on console. Can you help me

**** snippet for consumer ****

new easyXDM.Socket({

remote: “http://provider.easyxdm.net/example/resized_iframe.html”,

container: document.getElementById(“iframe-container”),

onMessage: function(message, origin){

this.container.getElementsByTagName(“iframe”)[0].style.height = message + “px”;

}

});

**** snippet for provider (Iframe) *****

var socket = new easyXDM.Socket({

onReady: function(){

socket.postMessage(document.body.scrollHeight);

}

});

]]>
By: Akın Evren Özsu https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1581 Sun, 06 Apr 2014 17:21:00 +0000 http://easyxdm.net/blog/?p=56#comment-1581 Is it possible to get dynamic content from created hidden iframe by using easyXDM?

I tried to fetch the xhr data by jquery, jsonp callback. but the value is not in json type.

What are your recommendations,?

]]>
By: edhedges https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1182 Mon, 19 Nov 2012 22:30:00 +0000 http://easyxdm.net/blog/?p=56#comment-1182 When I try this out and load the provider page alone I get an error that says: Uncaught Error: url is undefined or empty

Anyone know why this is happening? I am just testing both on localhost with different paths and I am getting the contents of the provider inside the consumer iframe when I load the consumer, but should the provider be erroring out? If not can I get some help?

thanks

]]>
By: Dinesh Kumar https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1158 Sun, 30 Sep 2012 17:18:00 +0000 http://easyxdm.net/blog/?p=56#comment-1158 Hi sean,
i tried the code mentioned above but i’m getting the below mentioned error in the console.

Unable to post message to http://api.mydomain.com. Recipient has origin http://mydomain.com.

can you help me out here ?

]]>
By: Daniel Gibby https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1152 Thu, 20 Sep 2012 17:51:00 +0000 http://easyxdm.net/blog/?p=56#comment-1152 Does code in the onMessage handler have access to the DOM of the receiver?

It doesn’t seem to be working, although alert(‘got here’) messages work fine.

]]>
By: Daniel Gibby https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1149 Thu, 20 Sep 2012 17:21:00 +0000 http://easyxdm.net/blog/?p=56#comment-1149  I’m having the same issue. I always see the alert, but the DOM changes don’t happen. I’ve tried using Firebug and Internet Explorer’s F12 breakpoints, and the breakpoints aren’t fired when the function is called from the onMessage signal, but they are when called directly with a click event. ie. javascript:doSomeDomChanges();

]]>
By: Øyvind Sean Kinsey https://easyxdm.net/wp/2010/03/17/setting-up-your-first-socket/comment-page-1/#comment-1122 Wed, 18 Jul 2012 18:42:00 +0000 http://easyxdm.net/blog/?p=56#comment-1122 Yes

Øyvind Sean Kinsey
San Francisco, CA

]]>