You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
How can I send resize information to the same iframe from two web pages? it seems that the "remote" url variable needs to be hard coded at setup time.
I'm using easyXdm socket to resize an iframe. It seems to be working on first load of the page. But I can't get it to resize when a new link is clicked from inside the iframe. Specifically when a user switches from a calendar view at 800 px high to a list view which might be 3000px high. So the new url might go from http://www.mysite.com/calendar_view/ to http://www.mysite.com/list_view/
Both pages will send back the hight information for the resize. That part is working. The problem is that the setup for the page has the remote variable hard set to http://www.mysite.com/calendar_view/ when the socket is created. So it will ignore messages sent from http://www.mysite.com/list_view/
var calendar_setup = {
remote: "http://www.mysite.com/calendar_view/",
container: document.getElementById("iframeContainer"),
onMessage: function(message, origin){
alert('test.page got the message from calendar' + message);
this.container.getElementsByTagName("iframe")[0].style.height = message + "px";
this.container.getElementsByTagName("iframe")[0].style.width = "800px";
}
};
var calendar_socket = new easyXDM.Socket(calendar_setup);
var runSocketMessenger = function() { calendar_socket.postMessage(); }
The text was updated successfully, but these errors were encountered:
You'll need to use an intermediary, or sibling frame to allow this - a
search on this list should yield several examples I think. Sibling is
definitely best, with your child page calling
parent.xdmiframename.resizeMe. that way the xdm frame is persistent while
your visible frame changes.
How can I send information to the same iframe from two web pages, when the
"remote" url variable is hard coded at setup time?
I'm using easyXdm socket to resize an iframe It seems to be working on
first load of the page But I can't get it to resize when a new link is
clicked from inside the iframe Specifically when a user switches from a
calendar view at 800 px high to a list view which might be 3000px high So
the new url might go from http://wwwmysitecom/calendar_view/ to http://wwwmysitecom/list_view/
Both pages will send back the hight information for the resize That part
is working The problem is that the setup for the page has the remote
variable hard set to http://wwwmysitecom/calendar_view/ when the socket
is created So it will ignore messages sent from http://wwwmysitecom/list_view/
—
Reply to this email directly or view it on GitHub #266.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
How can I send resize information to the same iframe from two web pages? it seems that the "remote" url variable needs to be hard coded at setup time.
I'm using easyXdm socket to resize an iframe. It seems to be working on first load of the page. But I can't get it to resize when a new link is clicked from inside the iframe. Specifically when a user switches from a calendar view at 800 px high to a list view which might be 3000px high. So the new url might go from http://www.mysite.com/calendar_view/ to http://www.mysite.com/list_view/
Both pages will send back the hight information for the resize. That part is working. The problem is that the setup for the page has the remote variable hard set to http://www.mysite.com/calendar_view/ when the socket is created. So it will ignore messages sent from http://www.mysite.com/list_view/
var calendar_setup = {
remote: "http://www.mysite.com/calendar_view/",
container: document.getElementById("iframeContainer"),
onMessage: function(message, origin){
alert('test.page got the message from calendar' + message);
this.container.getElementsByTagName("iframe")[0].style.height = message + "px";
this.container.getElementsByTagName("iframe")[0].style.width = "800px";
}
};
var calendar_socket = new easyXDM.Socket(calendar_setup);
var runSocketMessenger = function() { calendar_socket.postMessage(); }
The text was updated successfully, but these errors were encountered: