Connect With WRD
feed via e-mail
feed via e-mail

Posts Tagged ‘Javascript’

John Resig (the creator of jQuery) has created a pure JavaScript HTML parser that can definitely be very handy.

As more HTML code is inserted and formatted inside JavaScript tags, this parser can save serious development time with automating the process.

Some examples:

  • Unclosed Tags: HTMLtoXML("<p><b>Hello") == '<p><b>Hello</b></p>'
  • Empty Elements: HTMLtoXML("<img src=test.jpg>") == '<img src="test.jpg"/>'
  • Attributes Without Values: HTMLtoXML("<input disabled>") == '<input disabled="disabled"/>'

HTML is a language with lots of tricks and the parser may fail in some cases but it will work in most of them and will become better by time for sure.

inputEx is a javascript framework, built on the top of YUI, for creating forms and form objects.

It uses no html (opposite of unobtrusive libraries): all the fields and forms are configured using JSON. It provides a very efficient abstraction for building interactive web applications.

JavaScript Forms

inputEx features:

  • json configuration for each field
  • complex data structures (list/objects/tree/list of urls/objects of objects etc…)
  • composition between the fields (for “meta”-fields such as InPlaceEdit,List,Tree,Pair,…)
  • javascript object mapping for greater interactivity
  • a common “updated” event to handle different browsers and different field interactions

Fireworks.js is a JavaScript file which helps you create configurable fireworks effects in your website.

Besides using it, it is also a nice example of JavaScript effects and script fired sounds to get inspired.

JavaScript Fireworks

This JavaScript uses SoundManager for script triggered sounds and supports different types of fireworks effects including the "exploding-disappearing" and "random explosions".

There are lots of JavaScript color pickers which work great but there are few which are similar to the Photoshop’s color picker.

This JavaScript color picker has HSB and RGB options, uses Prototype and compatible with all major browsers.

JavaScript Color Picker

This script can be a solution for users who are looking for an advanced color picker in their applications.

JSGallery is a very nice AJAX image gallery built with Mootools.

Look & effects of the script is configurable. It supports browsing with keyboard between images and also pages.

Mootools Image Gallery

Features of this AJAX gallery:

  • nice transitions for page change, image select, etc.
  • supports easy to build no-script version
  • preloads images with separate indicators (optional)
  • a bunch of options to change the default styles and bevaviours
  • visibility of prev/next handles is controlled by mouse distance
  • use the arrow keys to go to previous/next image
  • use number keys to go to a certain page (beginning with 1)
  • prevents too fast change of images (ugly effect interruption)

Few posts ago, we had mentioned SoundManager (WRD post link), a JavaScript API for controlling Flash sounds.

MooSound is a very similar API for MooTools (thanks to Ruslan for suggesting the resource).

MooSound Flash Sound API

MooSound’s poweful features let you reach almost every aspect of the flash sounds like:

  • start, stop, pause
  • ID3 information
  • Filesize
  • Loaded Bytes
  • Duration
  • Position
  • Setting the volume
  • Setting the pan
  • Jump to feature

API is very well documented and a demo can be found at the homepage.

Scrollovers is a way to quickly and easily add flair to your web pages, giving your users an experience they weren’t expecting.

It is simply a JavaScript that helps creating rollover image-like links with text .

Mouse Over Text Link

How to use Scrollovers?

Insert the scrollovers.js file to your web pages and create your links like this:

<a href="[YOUR PAGE HERE]" class="scrollover" type="scrollover">[YOUR TEXT HERE]</a>

And the last add the styles with the color palette of your preference like below:

   a.scrollover {color: #557AFF;}
   a.scrollover em:first-line {color: #FF5B3C;}

And that’s it. 

easyAlbum is an open source image gallery script built with JavaScript.

This image gallery does not have an AJAX interface but it simply presents the images inside list tags with a Lightbox type browser friendly pop-up and navigation support.

JavaScript Image Gallery

How to use easyAlbum?

  • After inserting easyALBUM.js file in your page, create a list with the "ul" tag id equals gallery like <ul id="gallery"> and add the images inside the "li" tags.
  • Modify your "body" tag for onload like <body onload = "TJK_Gallery('gallery');">.

SoundManager is a Javascript Sound API which  effectively maps most of the native sound capabilities of Flash 8 to Javascript.

It enables you to control sound in a cross-browser/platform environment, using a language you already know.

Sound Manager

A sample SoundManager code would be:


You see that it is really easy. This JavaScript Flash Sound API has other powerful controls like:

  • stream
  • autoplay
  • onid3 – for ID3 tag displaying
  • whileplaying
  • and more..

Using SoundManager, you can easily create sound based web applications or more interactive background sounds for non-Flash websites.

For the projects that you don’t already have form controls, wForms is an open source unobtrusive JavaScript form controls library that you’ll find very useful.

Form Assembly

It includes input validation, tooltips, field synchronization controls and more.

How to use wForms?

It is pretty easy. After inserting the javaScript library to your pages you can control the field attributes with classes like:

<input type="text" ... class="required"/>

inserts the a required field control for this input.

Paging with navigation is also another nice control which makes multi-step forms easy to handle.

Uptime Robot