Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Simple pop-up window example
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Furn  
View profile  
 More options May 5 2012, 1:55 am
From: Furn <chris.tr...@gmail.com>
Date: Fri, 4 May 2012 22:55:46 -0700 (PDT)
Local: Sat, May 5 2012 1:55 am
Subject: Simple pop-up window example
I know your busy, thank you for your time in advance.

Hoping easyXDM can save me, this is the 5th project I've tried to get
IE8 + other browser, compatible bi-directional communication between
two windows from the same domain.

I've read your documentation and had trouble deciphering the
bridge.html example, I would hope it's as simple as the following code
below. (I've tried many combinations of parts of your example code)

There are many many queries on the web about doing just this, it would
benefit me and a great many people to have this example wrapped up in
2 or 3 simple html files, and be a great example on your website.

I also read somewhere that easyXDM creates its own iframe if needed,
so it should work in IE8? or does this need to be wrapped in an
iframe.

After reading your doc's I can't figure out what 'name.html' is for
the nameTransport fallback, neither can I find the file in your GIT
examples, I would like to auto-fallback to all three transports as
your website claims.

[index.html]

<! doctype html>
<html>
  <head>
        <!-- index.html -->
    <title>postmessage Test</title>
        <script type="text/javascript" src="easyXDM.debug.js"                                                            </
script>
        <script type="text/javascript">
easyXDM.DomHelper.requiresJSON("json2.js");           </script>

    <script type="text/javascript">
        var target;

        target = window.open("http://localhost/child.html",'popupWindow');

        var socket = new easyXDM.Socket({
                swf: "easyxdm.swf",
                onMessage: function(message, origin){
                        alert("Received '" + message + "' from '" + origin + "'");
                }
        });
        </script>

  </head>
  <body>
        Parent Window<br/>
    <button class="send-button" onclick="socket.postMessage('Msg from
Parent');">Post message</button>

  </body>
</html>

[child.html]

<! doctype html>
<html>
  <head>
        <!-- child.html -->
    <title>postmessage Child</title>
        <script type="text/javascript" src="easyXDM.debug.js"                                                            </
script>
        <script type="text/javascript">
easyXDM.DomHelper.requiresJSON("json2.js");           </script>

    <script type="text/javascript">

        var socket = new easyXDM.Socket({
                remote: "http://localhost/",
                swf: "easyxdm.swf",
                onMessage: function(message, origin){
                        alert("Received '" + message + "' from '" + origin + "'");
                }
        });
        </script>

  </head>
  <body>
    Popup Window<br/>
    <button class="send-button" onclick="socket.postMessage('Msg from
child');">Post message</button>

  </body>
</html>

Kind Regards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
findchris  
View profile  
 More options Aug 16 2012, 8:40 pm
From: findchris <findch...@gmail.com>
Date: Thu, 16 Aug 2012 17:40:34 -0700 (PDT)
Local: Thurs, Aug 16 2012 8:40 pm
Subject: Re: Simple pop-up window example

+1 for this

I cannot get communication working between a popup and a parent page in IE9.

And the IE notes in the FAQ
(http://easyxdm.net/wp/frequently-asked-questions/) is completely useless
as I have no idea if this is the issue or not.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Øyvind Sean Kinsey  
View profile  
 More options Aug 17 2012, 5:09 am
From: Øyvind Sean Kinsey <oyv...@kinsey.no>
Date: Fri, 17 Aug 2012 11:09:47 +0200
Local: Fri, Aug 17 2012 5:09 am
Subject: Re: Simple pop-up window example

Take a look at https://github.com/oyvindkinsey/JsApiToolkit
It comes with a client/server which supports displaying pages from the
server both using iframes and popups, which both can talk to the client
page.

But this in fact really simple once you break it down - if you from doc A
(dom A) can talk to doc B (dom B), then it can also by proxy talk to doc C
(dom B) via doc B even if it is in a popup, and vice versa. This is the
approach you need to use. Doc A and C talk via doc B.

Øyvind Sean Kinsey
San Francisco, CA


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
findchris  
View profile  
 More options Aug 17 2012, 3:57 pm
From: findchris <findch...@gmail.com>
Date: Fri, 17 Aug 2012 12:57:58 -0700 (PDT)
Local: Fri, Aug 17 2012 3:57 pm
Subject: Re: Simple pop-up window example

I see that example, and I see the bridge.html example for easyXDM.  

My configuration is quite similar:  Communicating from a pop-up to it's
opener on a separate domain.  I have the same bridge.html => blank.html =>
remoteapp.html flow as your example.  I have done a line-by-line comparison
of your bridge example code to mine, and the only differences that I see
are that your includes the 'local' and 'remoteHelper' helper options
required by the NameTransport.  I have the 'swf' option specified, so am
not using the NameTransport (although theoretically it should be using the
PostMessageTransport).  It's the oddest thing:  My code works perfectly on
all browsers except IE.  

I've traced the communication, and the remoteapp.html does not correctly
set the host:
try {
  if (window.opener.document.title) {
    host = window.opener;
  }

}

catch (xDomainError) {
  host = window.opener.frames[target]; // we get here
}

// host is null here!

Additionally, I note that my code reports that HAS_NAME_PROPERTY_BUG is
true, whereas your example reports false.  How is this possible?

Is there any other information I can provide that might help?  You can see
this in action here:  http://test.socialvibe.com/easyxdm_test.html

I appreciate your time!
Cheers,
Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
findchris  
View profile  
 More options Aug 17 2012, 8:52 pm
From: findchris <findch...@gmail.com>
Date: Fri, 17 Aug 2012 17:52:29 -0700 (PDT)
Local: Fri, Aug 17 2012 8:52 pm
Subject: Re: Simple pop-up window example

This has to do with using noConflict with IE popups.  See:
 https://github.com/oyvindkinsey/easyXDM/issues/192


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »