Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: cda6a93db2
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (50 sloc) 1.773 kB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>main</title>
<script src="jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="channels.js" type="text/javascript"></script>
<script>
var p= 0;
$(document).ready(function(){
//Sin Flash no cross domain si cross DOM
/*
$.channels.open("sistema").publish("sistema",['saluda','ventana','iframe']);
$("#clickme").click(function(){
console.log('click');
$.channels.trigger('sistema','saluda', {hola:'mundo'});
});
$.channels.bind('sistema','saluda',function(e,p){
$("#tt").append("el mundo diceeee "+p.hola+"<br>");
});
$("#popup").click(function(){
window.open("windowed.html", "external"+(p++), "width: 200, height: 200");
});
*/
//Con Flash y cross domain
$.channels.channels_ready(function(){
$.channels.open("sistema").publish("sistema",['saluda','ventana','iframe']);
$("#clickme").click(function(){
$.channels.trigger('sistema','saluda', {hola:'mundo'});
});
$.channels.bind('sistema','saluda',function(e,p){
$("#tt").append("el mundo diceeee "+p.hola+"<br>");
});
$("#popup").click(function(){
window.open("windowed.html", "external"+(p++), "width: 200, height: 200");
});
}).config({
useFlashConnector: true,
flashConnectorUrl: "/swf/comm.swf"
});
});
</script>
</head>
<body>
Test of channeljs
<button id="clickme">Click me</button><button id="popup">Abre ventanuco</button>
<iframe src="iframed.html" style="border: #ccc 1px solid; width: 100%; height: 300px;"></iframe>
<div id="tt"></div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.