resources | webdev

Concrete examples help put you on the left track a lot faster. Below are tidbits of Javascript and PHP source code. Feel free to use and modify this material to add functionality to your own site. The scripts are subjects to an attribution license, but you are free to use them in commercial projects.

PHP Scripts

PHP, the hypertext preprocessor, is an absolutely outstanding scripting language. It can generate HTML-content after your instructions. This can be used to include headers and footers, generate graphics on the fly or connect to an SQL database. i2 STUDIOS' website is based on this technology.

icon-txt.gifcreate_tableheader.inc
Downloads: 31
Views: 72
Creates 1..n no of clickable headers that alternates ascending and descending queries of a SQL database driven table in a dynamic webpage.
Show/Hide Functions Included
Hide/Show Instructions

Try DemoForward
icon-zip.gifresolution_statistics.zip
Downloads: 36
Views: 671
The Sizemograph lets you collect, organize and graphically analyze the statistics about screen settings and browser information of people who come to your website.
Show/Hide Functions Included
Hide/Show Instructions

Try DemoForward
icon-txt.gifstring-functions.inc
Downloads: 26
Contains string manipulating functions using regular expressions.
Show/Hide Functions Included
Hide/Show Instructions

Javascripts

Below are some libraries containing some of the Javascripts that make this site tick. They are created as external .js-files that can be included in an HTML-document by a single line of code:

<script type="text/javascript" src="PATH-TO-THE-SCRIPT"></script>

icon-js.gifglide.js
Downloads: 30
Views: 108
Glide in/out menu using div-tag and Math.sin() to smoothly open/close the menu when clicked.
Show/Hide Functions Included
Hide/Show Instructions

Try DemoForward
icon-js.giflogin_countdown.js
Downloads: 16
Views: 53
Graphical progress bar thatautomatically updates itself and counts down from 100% to 0% and then invokes an action (like a logout-page).
Show/Hide Functions Included
Hide/Show Instructions

Try DemoForward
icon-js.gifshow_hide.js
Downloads: 42
Views: 98
Show/hide button that displays and hides a portion of the page, reflowing the text as it goes on and off (just like the + below)
Show/Hide Functions Included
Hide/Show Instructions

Try DemoForward
icon-js.gifupdate_frames.js
Downloads: 21
This very simple script checks if a document is loaded without a required frameset. For example, people accessing your site from a search engine might stumple into a page whose navigation is located in another frame. This script loads the entire frameset to include the navigation.
Show/Hide Functions Included
Hide/Show Instructions

icon-js.gifupdate_title.js
Downloads: 11
Updates the frameset title so it matches the title of the page viewed. Frames can leave the user with the never-changing title of the frameset instead of each and every subpage the user visits. This scripts checks the title of the document the script is included in, and updates the topmost frame's title.
Show/Hide Functions Included
Hide/Show Instructions

icon-js.gifantispam.js
Downloads: 30
Views: 49
Fool the e-mail sniffing scripts that extracts your e-mail address and then sends you spam. One way of finding your e-mailaddress is by scanning the html code of your website, looking for potential e-mailaddresses (mailto: strings).
This solution is very simple and therefore not foolproof. But it is likely to shake of most spambots.
Show/Hide Functions Included
Hide/Show Instructions

Try DemoForward
icon-js.gifpreload.js
Downloads: 32
Starts preloading of graphics in the background before the user actually requests the graphics.
Show/Hide Functions Included
Hide/Show Instructions

Creative Commons License
This work is licensed under a
Creative Commons License.


Client | Internet | Server
View how this site works, and feel free to download the published scripts that make it happen.


Try the Sizemograph: the tool that keeps track of visitors' screen settings.


Tired of spam? Fool the spambots without affecting the friendly users.
Downloadantispam.js

© Copyright 1998-2008 i2 STUDIOS, Sweden. Some Rights Reserved | About Cookies | Disclaimer

Updated: 2007-07-20 (@16:38)