home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2003 May
/
PCWorld_2003-05_cd.bin
/
Komunik
/
phoenix
/
chrome
/
browser.jar
/
content
/
browser
/
bookmarks
/
selectBookmark.js
< prev
next >
Wrap
Text File
|
2002-11-16
|
776b
|
35 lines
var gBookmarkTree;
var gOK;
function Startup()
{
initServices();
initBMService();
gBookmarkTree = document.getElementById("bookmarks-view");
gBookmarkTree.treeBoxObject.selection.select(0);
gBookmarkTree.tree.focus();
gOK = document.documentElement.getButton("accept");
}
function onDblClick()
{
if (!gOK.disabled)
document.documentElement.acceptDialog();
}
function updateOK()
{
var selection = gBookmarkTree._selection;
gOK.disabled = selection.length != 1 ||
(selection.type[0] != "Bookmark" && selection.type[0] != "")
}
function onOK(aEvent)
{
var selection = gBookmarkTree._selection;
var url = BookmarksUtils.getProperty(selection.item[0], NC_NS+"URL", gBookmarkTree.tree.database);
window.arguments[0].url = url;
}