WEBTOP WIDGET

INTRODUCTION

The Webtop Widget is a sample JavaScript component that opens a "Webtop" from Navigator 4.0 or higher.

Source: webtop.jar
You can specify your own HTTP URL for the Webtop via the following HTML Form:

Note: submitting this form will open the webtop, which must be prefixed with "http://". To close the webtop, click on it and press Ctrl+W or Alt+F4, depending on your platform hot-keys.

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

This will open the webtop containing your query string URL.

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.

Webtops use this customizable "Canvas" mode to display a chrome-less "unframed" window, which is without a titlebar, menubar, statusbar or scrollbars, and can cover the entire desktop and be locked to the back-most layer of the display.

That's the idea in Webtops and Canvas mode, such that developers can display windows in a different way without the normal native window features, for various reasons, such as for building your own menubar or scrollbars that are unique and/or cross-platform.

Check out Visual DHTML, which illustrates examples of customized scrollbars, menubars, toolbars, statusbar, etc. in DHTML.

If you're not interested in customized scrollbars, then host your webtop page inside a frameset, and the frames-based scrollbars will work for scrolling your webtop.

DOWNLOAD

You should have no problems running your webtop from this page on-line; however, for off-line usage you can download the following ZIP archive which contains the webtop.jar:

webtop.zip

RESOURCES AND SUPPORT

For more information on developing Webtops, check out Visual DHTML, which supports Webtops.

Also, check out our Netcaster Documentation page, which includes information on Webtops.

For more information on signed scripts, view our JavaScript Security in Communicator 4.x page.

If you need technical support or other assistance, please visit the support area. Email your comments and suggestions about Webtops to dhtml-feedback@netscape.com.

Last Updated: 12/31/69 16:00:00


Copyright © 1997 Netscape Communications Corporation