PDA

View Full Version : Navigate to another page



yuriy.ivlyev
24 Mar 2011, 12:52 AM
Hi,
Is there way to navigate to another page?
Something like this:

window.open('mypage.html');
// or
document.URL='pypage.url';

yuriy.ivlyev
31 Mar 2011, 5:33 AM
found this solution:



var link = Ext.getDom('hiddenLink');
// must be created first in html property
// of any elemet as:
//<a id="hiddenLink" target="_blank" href="" style="visibility:hidden;"><a/>
link.href = url;
var clickevent = document.createEvent("Event");
clickevent.initEvent("click", true, false);
link.dispatchEvent(clickevent);

nikolawannabe
31 Mar 2011, 12:56 PM
Much simpler:


window.location = "url";

yuriy.ivlyev
4 Apr 2011, 4:42 AM
Need to open in another tab(as popup) :)