View Full Version : Force URL Navigation
Belfegor
30 Aug 2007, 10:48 AM
Sorry about the newbie question but...
is there a fast way to force to open an URL when i click, eg , a tree node ?
Or do i need to make an <A> and call click() on it ?
Your question's a bit unclear; do you mean updating a content panel or actually what JS you'd used to open a browser window...?
window.location = "http://www.google.com/";
// or
window.open("http://www.google.com", "mywindow", "menubar=1,resizable=1,width=350,height=250");
For content panel see: http://extjs.com/deploy/ext/docs/output/Ext.ContentPanel.html#setUrl and http://extjs.com/deploy/ext/docs/output/Ext.ContentPanel.html#load
For tree node see: http://extjs.com/deploy/ext/docs/output/Ext.tree.TreeNode.html#event-click
Animal
30 Aug 2007, 11:51 PM
A TreeNode will contain an <A> just add an href attribute to your node, and it will work.
You'll need the property hrefTarget if you want to change the target to have it open in a new window, or a named frame.
Belfegor
31 Aug 2007, 1:50 AM
I guess both solutions are good.
Thank you both.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.