JavaScript / DHTML / AJAX Code Snippet Index

JS Date-parser

This is a simple code-snippet that can be used to parse dates with javascript. It's setup to use European dates (dd.mm.yyyy | dd/mm/yyyy | dd,mm,yyyy), but it can easily be setup to use american dates as well (mm/dd/yyyy etc), to do so simply replace "$1" with "$2" and "$2" with "$1". No... (Read More)

Table Editer

This is a nice and easy table editer. Use it to add and delete cells, rows, and a caption (Read More)

Password Encrypter

Use this to encrypt your passwords, for login fields and password protection. (Read More)
-1

Power Calculator

Calculates Power to the number (Read More)

JavaScript Binary/ASCII Converter

Here's a script I worked up to convert binary code into ASCII. Didn't work out an ASCII to binary conversion yet. (Read More)

Display html tags on a webpage

Displays the html tags without rendering on a webpage. (Read More)

Two steps to install thumbnail viewer

1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function ViewImage(ifile,ix,iy,ititle) { var... (Read More)

Progress Bar

A simple progress bar that you can addUp with some common events' like redirecting the user to another source. And while they wait let this progress bar do some work for them... (Read More)

Browser Capability Checker

This script will lists all available methods, properties, values, and types, supported inside your browser. This is useful when you are creating script and you want to see a full reference lists of methods supported on the browser that you are working on - then you can simply run the script and... (Read More)

Iframe Fixer v1.0-

This script is capable of handling multiple iframes inside your page. Which allow you to specify fixed Width/Height with your iframes' to ensure layout stability in your page and also it comes with an auto-fit feature. <<<INSTRUCTION>>> — The iframeFixer.js must be included in your iframe... (Read More)

Fixed Position in any browser

This is a javascript code to fix any element in any browser. Simply add "fixed" to the classes of the desired element. Examples: <div class="fixed">FIXED</div> <div class="someClass fixed">FIXED</div> Though it's a little rough when scrolling I hope it will do the job. (Read More)

scroll smoothly

when you have long web pages, your users may be confused scrolling within your pages because built-in javascript scrollIntoView method makes the page move suddenly. ScrollToControl method moves slowly enabling the user to keep track of where he/she is going. (Read More)

Disble right click in browser

Check this for disable Right Click Permissions (Read More)

Image Rollover

First take two images named with smirk1.jpg and smirk2.jpg with same size paste below code and for Image write this code <IMG src="smirk1.jpg" name="smirk" onMouseOver="over(0);" onMouseOut="out(0);" /> (Read More)

Dynamic Calendar

Making a calendar is a bit more complex than making a timer or clock but mostly because any calendar script is going to be generating HTML to display the calendar and whenever you have programs writing programs things always get a bit funky! We'll do this as a prototype so all you have to do is... (Read More)

Combox Link Jumper

A simple tool that provides easy navigation in your site using a Combo box. It lets you jump to different location on the Web and also included with text display, which provides short details about the site. If you have comments, suggestions or request — don't hesitate to post back below. (Read More)

Javascript LOCATION constructor

INTRODUCTION The W3C's Window Object 1.0 specification (Working Draft dated 07 April 2006 at the time of writing) defines in it's Location Interface section a set of attributes (or fragments) by which a Location object may be addressed. Despite the draft status of this document, many... (Read More)

Image Preloader Script - Lite Version

This script simply preload's images inside (x)HTML document. <<<INSTRUCTION>>> — Simply attached these preloader.js in your document, were you want your images to be preloaded. — You can simply referenced it using <script type="text/javascript" src="path/preloader.js"></script> block. ... (Read More)

Javascript Regular Expression Testing Utility

Make regex creation easier! Enter regex, test string, select from various function to run, then see the output. (Read More)

Progress Bar v2.0-

This version is more precise and accurate compared to my first posted version of this script. (Read More)

Smart Mind "SCRIPT to Write Text files"

It is a simple one and a more complex one will be here soon this code has not been tested but it works well on IE 6.0+ Do enjoy and Comment it Please (Read More)

xml to html table

Converts xml document to html table (Read More)

Javascript Query Parser

INTRODUCTION Have you ever wanted to pass data from one web page to another when server-side scripting is unavailable, and without setting a cookie? Ever wanted an efficient way to build url query strings? Well now you can. SOLUTION It is maybe little realised is that data can be successfully... (Read More)

SiteShow -- Create a slideshow of web pages

This is a simple to use, self-contained website slideshow utility. Do you have a monitor or TV setup in your lobby where you'd like to present web content automatically? With this HTML/Javascript page, simply edit an array of pages or "slides". You define a title, duration, and URL for each slide.... (Read More)

joomla-like image scroll

very cute and short image scroll script. (Read More)

Collapsible Table

By calling this function from the header row of your table, you can make your table collapsible. (Read More)

Displaying all object properties

Sometimes, you need to see what properties does that object have and what values are assigned to them. This snippet does that. (Read More)

Comparing two html tables without a primary key

in the previous snippet i compared two tables having columns as name and value pairs. this new one compares two tables of any number of columns(as long as it is the same number on both tables). (Read More)

Comparing two html tables

compares to tables and highligthts the changes (Read More)

html table string to dom table

converts the html tables which are created by string concatenation to dom table objects (Read More)

Tab Menu

very simple very powerful tab menu, it can be used as a switch menu or to hide-show associated panels. (Read More)

xml to html table v.2

I saw that in some xml files, child numbers are not the same for the elements which will correspond to our table rows. So i created a more smart version which is error tolerant. (Read More)

Tab menu with rounded corners generator

I have searched for a tab menu script for a long time but none of them was flexible enough,then i created one for me. The algorithm is nice so the script is not too long although being flexible. your tab menu is in an html table row as follows : (Read More)

Datalist Creator

Creates Asp.Net-like Datalist (Read More)

Table Pager

Creates a paged view of any html table (Read More)

Stylesheet changer

A basic example on how to change your stylesheet dynamicaly! I will use a dropDown list to control the environtment! Assuming that you have 4 different .css ( default, red, blue and green ) on your directory! From this line you'll have to replace this with your own stylesheets. default.css... (Read More)

Image Swap with the Mouse

Swap two images as you move your mouse in and out of the image field. Uses onMouseOver, onMouseOut and a short javascript code. (Read More)

The W3Cs Validation tools

In for the latest addition to my code snippets, here's one you'll trully appreciate. This validation tools is packed with the W3Cs (x)HTML Markup validator, CSS validator, MobileOK tester and Semantics Extractor. hope you'll enjoy this newest addition of snippets'... (Read More)

Function to find prime numbers

Accepts number as input, writes the prime numbers up to that number to the screen. (Read More)

Live Date Lite v1.08

A simple date picker with live 12/24hr clock, month/week names, 2/4 digits' year display and supported with configuration settings... (Read More)

Forum Tools


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC