This sample JavaScript component opens a "Webtop" from Navigator 4.0 or higher.
Source: webtop.jarYou can specify your own URL for the Webtop via the following HTML Form:
You can also use this digitally signed script with un-signed web pages, as well, by adding the script to your web page, like this:
<SCRIPT LANGUAGE="JavaScript1.2" SRC="webtop.js" ARCHIVE="webtop.jar">
Then call your page with the URL of your webtop attached as a query string, something like this:
http://www.yourdomain.com/yourpage.html?http://www.yourdomain.com/yourwebtop.html
HOW IT WORKS
Contained within the "webtop.jar" file is a JavaScript library file entitled: "webtop.js". The code in this library contains the following function:
function openWebtop() { var url = location.search.substring(1,location.search.length); netscape.security.PrivilegeManager.enablePrivilege('CanvasAccess'); window.webtopWin = window.open(url || "http://developer.netscape.com", 'webtop', 'alwaysLowered=yes,outerWidth='+ screen.availWidth +',outerHeight='+ screen.availHeight +',left='+ screen.availLeft +',top='+ screen.availTop +',titlebar=no'); }
The openWebtop() function is a part of this digitally signed script, which requests the "CanvasAccess" privilege via the netscape.security.PrivilegeManager to display the Webtop.
To close the webtop, click on it and press Ctrl+W or Alt+F4, depending on your platform hot-keys.
For more information on signed scripts, check out our JavaScript Security in Communicator 4.x page.
Send feedback to dhtml-feedback@netscape.com