easyXDM
easyXDM copied to clipboard
Usage intermediary frame with dynamic pages
Hi,
I found your great framework.
I´d like to load a website (with dynamic pages) from an external domain into a Wordpress-Site. I used scripts from your resize_iframe.html
and resize_intermediate.html
easyXDM.min.js
loads in both domains.
My init.js in Wordpress-Site (located in /js
)
This works for me with just .html
pages.
new easyXDM.Socket({
container: "iframeshop",
remote: "http://externdomain.com/js/plugins/easyxdm/example/resize_intermediate.html?url=resized_iframe_1.html",
local: "js/plugins/easyxdm/name.html",
remoteHelper: "js/plugins/easyxdm/name.html",
props: {
style: {
width: "900px",
height: "100%",
border: "0"
}
},
swf: "plugins/easyxdm/easyxdm.swf",
onMessage: function(message, origin){
this.container.getElementsByTagName("iframe")[0].style.height = message + "px";
}
});
External-Domain init.js (located in /js
)
var socket = new easyXDM.Socket({
local: "plugins/easyxdm/name.html",
swf: "plugins/easyxdm/easyxdm.swf",
onReady: function(){
socket.postMessage(document.body.scrollHeight)
}
});
I´d like to
I can´t link to an static physical .html pages on external domain, can I chance the url="..."
target to an absolute path like 'http://externdomain.com/dyn-page.php?page=1
?
remote: "http://externdomain.com/js/plugins/easyxdm/example/resize_intermediate.html?url=http://externdomain.com/dyn-page.php?page=1"
Thanks for your help Ingo
Yeah, that should simply work. You might want to set the useHash (or what it's called) flag though if your server doesn't like the arguments passed. On May 19, 2013 1:44 AM, "ingozoell" [email protected] wrote:
Hi,
I found your great framework.
I´d like to load a website (with dynamic pages) from an external domain into a Wordpress-Site. I used scripts from your resize_iframe.html and resize_intermediate.html
easyXDM.min.js loads in both domains.
My init.js in Wordpress-Site (located in /js) This works for me with just .htmlpages.
new easyXDM.Socket({container: "iframeshop",remote: "http://externdomain.com/js/plugins/easyxdm/example/resize_intermediate.html?url=resized_iframe_1.html",local: "js/plugins/easyxdm/name.html",remoteHelper: "js/plugins/easyxdm/name.html",props: { style: { width: "900px", height: "100%", border: "0" } },swf: "plugins/easyxdm/easyxdm.swf",onMessage: function(message, origin){this.container.getElementsByTagName("iframe")[0].style.height = message + "px";}});
External-Domain init.js (located in /js)
var socket = new easyXDM.Socket({ local: "plugins/easyxdm/name.html", swf: "plugins/easyxdm/easyxdm.swf",
onReady: function(){ socket.postMessage(document.body.scrollHeight) }});
I´d like to
I can´t link to an static physical .html pages on external domain, can I chance the url="..." target to an absolute path like ' http://externdomain.com/dyn-page.php?page=1 ?
remote: "http://externdomain.com/js/plugins/easyxdm/example/resize_intermediate.html?url=http://externdomain.com/dyn-page.php?page=1"
Thanks for your help Ingo
— Reply to this email directly or view it on GitHubhttps://github.com/oyvindkinsey/easyXDM/issues/226 .
Hi, thanks.
You might want to set the useHash (or what it's called) flag though if your server doesn't like the arguments passed.
Sorry, I don´t really understand it, can you give me an additional code example?
Are the remote
links below correct? I have just to chance server configurations (on one or both domains) and not the javascript files?
I updated/correted my starting example http://domain.com --> http://externdomain.com/dyn-page.php?page=1
remote: "http://domain.com/.../resize_intermediate.html?url=http://externdomain.com/dyn-page.php?page=1"
I test it with an other external domain, too (WordPress-Site)
remote: "http://domain.com/.../resize_intermediate.html?url=http://externdomain.com/contact"
Doesn´t work for me.
Thanks Ingo
From the readme - https://github.com/oyvindkinsey/easyXDM
hash {Boolean} - Whether to pass the setup data using the hash instead of using the query. This is mainly useful in scenarios where query arguments affects efficient caching or where the providers HTTP server does not support URL's with query parameters. Using the hash is not compatible with hash based history managers etc.
Not sure what's going wrong with your code, but you must escape the uri before placing it into the query string of the remote uri - characters like ? are simply not allowed there per the specs, and will throw off the uri parser.
Øyvind Sean Kinsey San Francisco, CA
On Mon, May 20, 2013 at 2:35 AM, ingozoell [email protected] wrote:
Hi, thanks.
You might want to set the useHash (or what it's called) flag though if your server doesn't like the arguments passed.
Sorry, I don´t really understand it, can you give me an additional code example? Are the remote links below correct? I have just to chance server configurations (on one or both domains) and not the javascript files?
I updated/correted my starting example http://domain.com --> http://externdomain.com/dyn-page.php?page=1
remote: "http://domain.com/.../resize_intermediate.html?url=http://externdomain.com/dyn-page.php?page=1"
I test it with an other external domain, too (WordPress-Site)
remote: "http://domain.com/.../resize_intermediate.html?url=http://externdomain.com/contact"
Doesn´t work for me.
Thanks Ingo
— Reply to this email directly or view it on GitHubhttps://github.com/oyvindkinsey/easyXDM/issues/226#issuecomment-18139208 .