daepark / postmessage

window postmessage plugin for cross-window messaging
http://postmessage.freebaseapps.com
178 stars 55 forks source link

No such interface supported - IE7 #13

Closed ghost closed 12 years ago

ghost commented 12 years ago

I'm trying to set this up with a pop up and in IE7 I get the following error message when trying to post from the pop up to the parent window:

No such interface supported Line 74

According to debugger it is this line: target.postMessage(JSON.stringify(msg), o.origin || '*');

Any ideas?

daepark commented 12 years ago

Please refer to the "Known Issues" section in http://postmessage.freebaseapps.com/ regarding IE7.

ghost commented 12 years ago

Yep, already looked at that. This is what I have in the popup:

function post(type) { $.pm({ target: window.opener, type: type, data: "hey it works", success: function(data) { $("#msg").append(data); }, url: "http://www.sitename.com" });
};

Am I missing something? Thanks for the quick response btw.

daepark commented 12 years ago

"When using the location hash to pass postmessages, the two windows MUST be direct parent/child windows of each other and one window must be the top most window in the window stack. If this is not the case, you may run into security errors in some of the browsers trying to set the location and get the frames property of a window that is cross-origin."

-dae

On Tue, Feb 21, 2012 at 1:24 PM, devilmike reply@reply.github.com wrote:

Yep, already looked at that. This is what I have in the popup:

function post(type) {        $.pm({          target: window.opener,          type: type,          data: "hey it works",          success: function(data) {            $("#msg").append(data);          },          url: "http://www.sitename.com"        });      };

Am I missing something? Thanks for the quick response btw.


Reply to this email directly or view it on GitHub: https://github.com/daepark/postmessage/issues/13#issuecomment-4089202

ghost commented 12 years ago

I guess I don't understand that statement. I thought the popup is a child of the window it is spawned from and that this is a parent/child relationship. Is this not true, or are you saying it won't work with a popup?

On Tue, Feb 21, 2012 at 5:52 PM, daepark < reply@reply.github.com

wrote:

"When using the location hash to pass postmessages, the two windows MUST be direct parent/child windows of each other and one window must be the top most window in the window stack. If this is not the case, you may run into security errors in some of the browsers trying to set the location and get the frames property of a window that is cross-origin."

-dae

On Tue, Feb 21, 2012 at 1:24 PM, devilmike reply@reply.github.com wrote:

Yep, already looked at that. This is what I have in the popup:

function post(type) { $.pm({ target: window.opener, type: type, data: "hey it works", success: function(data) { $("#msg").append(data); }, url: "http://www.sitename.com" }); };

Am I missing something? Thanks for the quick response btw.


Reply to this email directly or view it on GitHub: https://github.com/daepark/postmessage/issues/13#issuecomment-4089202


Reply to this email directly or view it on GitHub: https://github.com/daepark/postmessage/issues/13#issuecomment-4091199

daepark commented 12 years ago

Actually I've never tested with popups only embeded iframes. You can easily test by trying to get/set window.opener.location or it's equivalent.

On Tue, Feb 21, 2012 at 3:14 PM, devilmike reply@reply.github.com wrote:

I guess I don't understand that statement. I thought the popup is a child of the window it is spawned from and that this is a parent/child relationship. Is this not true, or are you saying it won't work with a popup?

On Tue, Feb 21, 2012 at 5:52 PM, daepark < reply@reply.github.com

wrote:

"When using the location hash to pass postmessages, the two windows MUST be direct parent/child windows of each other and one window must be the top most window in the window stack. If this is not the case, you may run into security errors in some of the browsers trying to set the location and get the frames property of a window that is cross-origin."

-dae

On Tue, Feb 21, 2012 at 1:24 PM, devilmike reply@reply.github.com wrote:

Yep, already looked at that. This is what I have in the popup:

function post(type) {        $.pm({          target: window.opener,          type: type,          data: "hey it works",          success: function(data) {            $("#msg").append(data);          },          url: "http://www.sitename.com"        });      };

Am I missing something? Thanks for the quick response btw.


Reply to this email directly or view it on GitHub: https://github.com/daepark/postmessage/issues/13#issuecomment-4089202


Reply to this email directly or view it on GitHub: https://github.com/daepark/postmessage/issues/13#issuecomment-4091199


Reply to this email directly or view it on GitHub: https://github.com/daepark/postmessage/issues/13#issuecomment-4091639