Widget Environment

Introduction

This Widget Environment JavaScript Library was written in order to provide webmasters a quick way to give their pages a desktop look, feel and functionality without having to run any extra services like PHP or ASP.

A screenshot of the Widget Environment

Demo

A demo of the Widget Environment is running at the WE's SourceForge page. You can check it out here.

Download

To download the JavaScript library and some samples click here and you will have your own desktop-like website running in no-time!

Usage

Implementing the library is quite easy. Alter the index.html page in the package to your own needs or follow the following steps:
  • Link the library in the <head> tag:

    <head>
    <title>Widget Environment</title>
    <script src="Widget.js" type="text/Javascript"></script>
    </head>

  • At onKeyDown listener to the body tag. This will enable resizing while hitting shift.

    <body onKeyDown="keyDown(event)">

  • Build a menu. Copy the menu from the index.html file in the library and alter it so that it will contain your website's pages.


  • Create the Navigation Bar, icons and Widgets you want to show onLoad using the function

    addIcon (image, xPosition, yPosition, caption, link);

    and

    makeNewWidget(link, widgetTitle, width, height, maximizeOnStartup);

    Example:

    <script>
    createNavBar();
    addIcon("img/network.png", 70, 70, "Login", "http://www.computer.com/login.php");
    </script>
    makeNewWidget("welcome.html", "Welcome", 300, 300, false);

That's all!

License LPGL

License
Widget Environment
Copyright (C) 2007 Bart Spaans

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Further Information

Visit this project's SourceForge page at http://wiget-env.sourceforge.net for more information, the bug tracker and the forum.