> 12/12/2007 : JsLib v1.4 is available
 
 

Cette page en Français
Presentation - Documentation - Installation - Usage - Download

If you are searching for JSLib, the library of Mozilla community, please visit: http://jslib.mozdev.org/

  Presentation

JsLib is a French-written library of JavaScript functions. Its goal is to make easier the task of the developer in two manners:

  • by placing at his disposal all the functions which he can need during the development for a dynamic Web site;
  • by masking completely the compatibility problems between the main Web browsers on the market.

JsLib functions are gathered according to their application in several files.

The current version of JsLib is version 1.4.

JavaScript

JavaScript is a light and interpreted programming language, with object-oriented functionalities.

The general kernel of the language has been embedded in Netscape Navigator, then in others Web browsers.

The language is optimized for Web programming with addition of objects which represent the window of the browser and its contents.

  Documentation

Read directly the index of the documentation...

... or look at the documentation and the examples of the JsLib scripts which interest you:

chrono.js Simulates a stop watch and displays the elapsed time. Doc Exemple
clavier.js Catches and manages the keyboard's events. Doc Exemple
cookies.js Reads, writes and deletes current Web page's cookies. Doc Exemple
crypto.js Encrypts/decrypts (AES) and checks the integrity (MD5) of data. Doc Exemple
date.js Formats the current date and the "last modified" date of the document. Doc Exemple
dialogues.js Displays and monitors the most common dialog boxes. Doc Exemple
dyna.js Monitors divisions (or layers) on dynamic Web pages (DHTML). Doc Exemple
fenetres.js Changes the properties and the contents of the browser's windows./td> Doc Exemple
forms.js Formats, verifies and recovers the contents of HTML forms. Doc Exemple
heure.js Formats the current hour and displays it in a static or dynamic way. Doc Exemple
images.js Monitors the load process and the display of pictures. Doc Exemple
langue.js Detects the language used by the client's browser. Doc Exemple
liens.js Inserts a link on a text, a picture, a button or a dynamic picture ("rollover"). Doc Exemple
medias.js Inserts an audio or video recording in the current Web page. Doc Exemple
monnaie.js Computes the french VAT and amounts including all taxes, and converts a currency into Euro. Doc Exemple
navig.js Detects the browser, its version and the operating system of the client. Doc Exemple
souris.js Catches and manages the mouse's events. Doc Exemple
xml.js Loads a XML file and permits to access to the data it contains. Doc Exemple

  Installation

To install JsLib on your computer, you just have to uncompress the file (jslib14.zip or jslib14.tar.gz) in the directory of your choice. Three sub-directories are then created:

  • doc/ : documentation of the scripts in HTML format;
  • exemples/ : HTML pages with examples illustrating the operation of JsLib functions;
  • scripts/ : JavaScript files of JsLib.

If you choose to use JsLib to develop a Web site, copy the scripts/ directory in the root directory of your site.

  Usage

The best way to understand the operating mode of JsLib is the following one:

  • read the documentation of the script of your choice in order to understand the role, the operating mode and the syntax of each function;
  • open the example page of this script in a Web browser and test the way it runs;
  • open the example page of this script in a text editor and have a look at the integration of the script in the HTML code and its usage;
  • now it's your turn!

As an example, here is the HTML code of a Web page which simply displays the current date:

Compatibility

All the provided functions are in conformity with the ECMA-262 Standard (JavaScript 1.3). They have been tested and validated with:

  • Internet Explorer 5.0, 5.5, 6.0 and 7.0
  • Mozilla Firefox 1.0, 1.5 and 2.0
  • Nestcape 6, 7, 8 and 9
  • Opera 6, 7, 8 and 9
  • Safari 1, 2 and 3

Approximately 95% of the functions work fine with the past versions of these browsers (Internet Explorer 4.0, Netscape 4.7, etc.) and with others browsers partially ECMA-262 compliant (Galeon, Konqueror, OmniWeb, etc.).

    <HTML>
        <HEAD>
            <TITLE>Date du jour</TITLE>
            <!-- includes the JsLib file -->
            <SCRIPT LANGUAGE="JavaScript" SRC="date.js"></SCRIPT>
        </HEAD>
        <BODY>
            <!-- call the wanted JavaScript function -->
            <SCRIPT LANGUAGE="JavaScript">
                document.write(dateJour());
            </SCRIPT>
        </BODY>
    </HTML>
            

This page runs in any JavaScript/ECMAScript compliant browser, on the condition of copying the file date.js in the same directory as the page.

  Download

Download the file in ZIP or TAR/GZIP format then use the adequate command or tool to extract the files from it.

jslib14.zip ZIP archive Download
jslib14.tar.gz TAR/GZIP archive Download

Mistakes, criticism, improvements, questions: all the comments are welcome. Write to the author to this e-mail address:
echevillard (at) users.sourceforge.net.

 
Project hosted by SourceForge.net. SourceForge.net logo

License

JsLib 1.4
Copyright © 2001 E. CHEVILLARD.

This program 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, version 3 of the License.

This program 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.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Top of the page
Presentation - Documentation - Installation - Usage - Download
 
Web site

Last updated on 12/12/2007
Copyright © 2001 E. CHEVILLARD

E-mail