Enhance External Links





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

10
Date Submitted Mon. Jun. 4th, 2007 2:37 PM
Revision 1
Scripter Fordiman
Tags createElement | JavaScript | kiss
Comments 1 comments
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:
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
10
Date Submitted Mon. Oct. 10th, 2005 11:40 AM
Revision 1
Helper ryan
Tags External | JavaScript | Links | Window
Comments 2 comments
Make External Links Open in New Window
10
Date Submitted Wed. Nov. 9th, 2005 11:45 PM
Revision 1
Helper poncho
Tags Form | JavaScript | Zero
Comments 0 comments
ZeroField
10
Date Submitted Fri. Feb. 10th, 2006 7:52 AM
Revision 1
Helper lilleman
Tags Cookie | Handler | JavaScript
Comments 2 comments
Cookie Handle
10
Date Submitted Mon. Mar. 6th, 2006 7:09 PM
Revision 1
Helper Snyke
Tags ajax | DHTML | JavaScript | snyke | web2.0 | web20
Comments 1 comments
AJAX: In situ edit
A simple edit in place using Prototype, based on the tutorial @ 24ways.org
10
Date Submitted Fri. Aug. 25th, 2006 7:30 PM
Revision 1
Helper psykoprogrammer
Tags inheritance | JavaScript
Comments 0 comments
A small example demonstrating inheritance in Javascript, complete with calling base class constructors and methods. For the more detailed description, visit http://www.adampresley.com.
10
Date Submitted Wed. Feb. 28th, 2007 3:35 PM
Revision 1
Helper mjlintz
Tags JavaScript
Comments 2 comments
Highlight table row on rollover.
10
Date Submitted Wed. Nov. 9th, 2005 8:41 PM
Revision 1
Beginner vinnie
Tags Hover | JavaScript | Row
Comments 0 comments
Table Row Hove
10
Date Submitted Mon. May. 1st, 2006 8:26 AM
Revision 1
Coder mattrmiller
Tags Focus | Form | JavaScript | Password | Username
Comments 0 comments
This is a correct way to do login form auto-focus, checking to see if either username or password have focus already. This prevents someone from typing a username hitting TAB, then having JavaScript chime in, resetting focus to Username while user is typing in their password. In this case, the password is appended to the username which is in plaintext.
10
Date Submitted Fri. Aug. 18th, 2006 1:13 AM
Revision 1
Syntax Master sundaramkumar
Tags JavaScript
Comments 0 comments
This will convert the time from number of seconds to HH:MM format