2013-03-20 93 views
0
$(document).ready(function(){ 
    $("#tree").jstree({ 
     "xml_data" : { 
      "ajax" : { 
       "url" : "jstree.xml"    
      }, 

      "xsl" : "nest" 

      }, 
    "themes" : { 

      "theme" : "classic", 

      "dots" : true, 

      "icons" : true 

     }, 
      "ui": { 
      "initially_select" : [ "#1234" ] 
     }, 
    "search" : { 

       "case_insensitive" : true, 

       "ajax" : { 

        "url" : "tree.xml" 

       } 

      }, 
    "plugins" : ["themes", "xml_data", "ui","types", "search", "cookies"], 
    "core" : { "initially_open" : [ "12345" ] } 
    }).bind("select_node.jstree", function (event, data) { 
      var node_id = data.rslt.obj.attr("id"); 
      $.cookie("example", node_id, { path: '/', expires:7 }); 
      window.open('new.html', '_newtab','width=800,height=1000,resizable=1,scrollbars=1'); 

    }); 

我试图jstree来填充树和节点上单击时,我需要启动一个名为new.html使用Cookie来存储的价值新窗口节点ID。有用。但我需要的是,当点击jstree节点时,我需要一个新的new.html窗口并单击另一个节点,而不是更新new.html,我需要另一个窗口以及新的node_id。因此,需要使用new.html为每个node_id指定多个窗口。这可能与jQuery的?打开多个窗口时,点击jstree节点

回答

2

具有如下的空参数的窍门。

window.open('new.html', '','width=800,height=1000,resizable=1,scrollbars=1'); 
+0

您可以接受您自己的答案... – Radek 2013-03-21 21:52:22

相关问题