What is the proper SmartClient method to navigate to a different page, or even open a non-SmartClient page in a new window? Do I need to use SmartClient's window object somehow? I tried using a menu's click event and window.open, which successfully opened a new window, but the original browser window threw JavaScript errors in the process:
Code:
[Exception... "'Permission denied to get property XULElement.accessKey' when calling method: [nsIDOMXULLabelElement::accessKey]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://testMachine:8080/xxx/Menu.js :: navigateToDash :: line 53" data: no]
[Break on this error] var newWindow = window.open("/dash", "win_dash");
Code:
isc.Menu.create({
ID:"Menu2",
title:textResources.Menu2,
data: [
{title:textResources.Menu2_1},
{title:textResources.Menu2_2},
{title:textResources.Menu2_3, click: "navigateToDash()"},
{title:textResources.Menu2_4},
{title:textResources.Menu2_5},
]
});
function navigateToDash() {
var newWindow = window.open("/dash", "win_dash");
if (newWindow) {
if (newWindow.focus) {
newWindow.focus();
}
}
}
Comment