Reputation: 10626
$(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');
});
I am trying to jstree to populate the tree and when clicked on a node, I need to fire up a new window called new.html using cookies to store the value of the node id. It works. But I need is, when clicked on the jstree node, I need a new new.html window and clicked on another node, rather than updating the new.html, I need another window with the new node_id. So, need multiple windows for each node_id using new.html. Is this possible with jquery?
Upvotes: 0
Views: 482
Reputation: 10626
having the empty argument as below does the trick.
window.open('new.html', '','width=800,height=1000,resizable=1,scrollbars=1');
Upvotes: 2