11
Restrict input to alphanumeric and uppercase
11
Find and replace a string or character(s) inside another string
11
check if your browser/javascript supports Ajax.
For this we can use prototype's getTransport method.
For this we can use prototype's getTransport method.
10
A prototype function to get an array of elements by id in an array
10
Gives you control to perform actions when the control key and the mouse button is clicked in the same time. Something similar to selecting elements in Windows with ctrl+click.
Just change the event.ctrlKey to event.shiftKey to make it shift+click. If you don't get it don't worry the snippet contains the demo for shift+click too.
You may need to change the event.which though 1 = left click, 2 = middle click, 3 = right click(at least in firefox 1.5.0.5)
Just change the event.ctrlKey to event.shiftKey to make it shift+click. If you don't get it don't worry the snippet contains the demo for shift+click too.
You may need to change the event.which though 1 = left click, 2 = middle click, 3 = right click(at least in firefox 1.5.0.5)
10
This snippet allows an aspx page (c#) to accept URL parameters to allow styles or script to be dynamically appended to the rendered page.
I wrote this simple snippet to allow one of our vendors to accept a style override so that their application would morph into something more closely resembling our own portal application. Please see screenshots for clarification.
Original Vendor Application
Vendor Application with Style Override via URL
I wrote this simple snippet to allow one of our vendors to accept a style override so that their application would morph into something more closely resembling our own portal application. Please see screenshots for clarification.
Original Vendor Application
Vendor Application with Style Override via URL
10
This simple function simply removes the character at the given index from a string.
NOTE: The count starts from 0
NOTE: The count starts from 0
10
Adds any character at the given index of a string.
NOTE: Count starts from 0
NOTE: Count starts from 0
10
This is a simple cookie object that handles some of the basic cookie functions and which is kind of like a simple cookie-object parser.
Hope you like it.
Hope you like it.
10
This is a function I created to ease headaches caused by creating and inserting new stuff in an HTML document dynamically. Essentially, it allows you to specify an HTML tag, in its entirety (attributes, styles, event handling, etc), via a single command. You can nest it, so as to create an entire element tree programmatically in a lot less time as with document.createElement.
Don't let the goofy function acronym fool you; this is damned powerful.
First, the function spec:
HTMLElement acne(type[,attributes[,styles[,events[,children[,parent[,document]]]]]]);
Arguments:
Return value: The newly created/configured element
Don't let the goofy function acronym fool you; this is damned powerful.
First, the function spec:
HTMLElement acne(type[,attributes[,styles[,events[,children[,parent[,document]]]]]]);
Arguments:
String type: type of element to create; same information as the argument of document.createElement
mixed Object attributes: attributes you want the new element to have (ie: href, src)
mixed Object styles: styles for the new element (ie: width, borderLeft)
(function|function Array) Object events: event handlers for the new element
HTMLElement|HTMLElement Array children: elements you want to be in the new element (ie: nesting is possible)
HTMLElement parent: parent node of object
HTMLDocument document: document to create element in
Return value: The newly created/configured element









