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