<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="keywords" content="jquery,ui,easy,easyui,web"> <meta name="description" content="easyui help you build your web page easily!"> <title>Async Tree - jQuery EasyUI Demo</title> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/demo/demo.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script> <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> </head> <body> <div style="width: 300px; float: left;"> <ul id="tt" class="easyui-tree" url="get_tree_data_id_div.php" data-options="animate:true" > </ul> </div> <!-- A IFRAME CARREGA A SRC ATRAVES DO PHP--> <iframe id="a" class="teste" style="float: left; width: 500px; height: 225px; visibility: hidden; background-color: #CCCCCC;" src='load_url_db_div.php'> </iframe> <iframe id="a1" class="teste" style="float: right; width: 500px; height: 225px; visibility: hidden; background-color: #CCCCCC;" src='load_url_db_div2.php'> </iframe> <button class="button" onclick="new_tab();" ><span class="icon">Open in window</span></button> <script language="Javascript" type="text/javascript"> //TORNA A IFRAME VISIVEL var url; var node; a = 0; $('#tt').tree({ onclick: function(){ console.log("Entrou na funçao.."); $("#a").css("visibility", "visible"); $("#a1").css("visibility", "visible"); node = $('#tt').tree('getSelected'); console.log("Selecionou o no.."); $("#a").attr('src', "load_url_db_div.php?id=" + node.id); $("#a1").attr('src', "load_url_db_div2.php?id=" + node.id); url = "load_url_db_div.php?id=" + node.id; console.log("URL = " + url); console.log("ID do no selecionado: " + node.id); } }); function new_tab() { if(a !== node.id) {a++; console.log("Entrou na funcao do tab.."); window.open(url, a, "height=200,width=500"); } }; </script> <script src="ZeroClipboard.min.js" type="text/javascript"></script> <script type="text/javascript"> var clip = new ZeroClipboard(document.getElementById("a"),{ moviePath: "ZeroClipboard.swf" } ); clip.on( 'dataRequested', function ( client, args ) { console.log("entrou na funcao"); var frameObjb = document.getElementById("a"); var frameDocb = (frameObjb.contentWindow || frameObjb.contentDocument); if(frameDocb.document) { console.log("entrou no if"); frameDocb = frameDocb.document; frameObjbb = frameDocb.getElementById("pergunta").value; clip.setText(frameObjbb); console.log(frameObjbb); } } ); clip.on( 'complete', function(client, args) {} ); </script> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)