Element.addMethods({
  pngHack: function(el){
    var el = $(el);
...

JavaScript pngHack

by getopenid.com/deleteme, November 15, 2007 03:40, 1 refactoring, tagged with rails, image, png, img, prototype, hack

Makes 32 bit PNG's transpar...

Db11d496fa96adac53b422feb6efd493 Talk
//function that loops through the elements
function __validateForm(theform){
...

JavaScript Simple form validator with ...

by eljota, November 11, 2007 10:32, 5 refactorings, tagged with javascript, js, form, validation, regex

This is a real simple form ...

D41d8cd98f00b204e9800998ecf8427e Talk
<script type="text/javascript">

window.onload = function() {
...

JavaScript Shorten links

by DeathfireD, November 09, 2007 14:23, 8 refactorings, tagged with url, short, short url

is there a better, shorter,...

421453710d51d7daaea8069af0aa4126 Talk
var Fenster = null;
function neuesFenster(meineSeite,meinName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
...

JavaScript Unobstrusive changing of im...

by doroda.myopenid.com, November 06, 2007 08:50, 2 refactorings, tagged with image, loadspeed

I am pretty new to javascri...

C7f0f836bc69eeeaa3ab061ac2b6d8d7 Talk
document.write ('<noscript>\n');
document.write (imageClick);
document.write ("</noscript>");

JavaScript I care about older browsers...

by Gary Haran, October 30, 2007 22:30, 3 refactorings

I found this great piece of...

403e57e2be130d2218f992b86dfa8260 Talk
function toUpperCase( str : String ):String {
...

JavaScript Uppercase a string, but ski...

by slaskis, October 30, 2007 18:46, 2 refactorings, tagged with string, uppercase, avoid characters

I had to do this on my curr...

Ad2ffc6b05fb4390643f36a258b86362 Talk
<script type="text/javascript">
var feature_stuff = new Array(
'<li><a href="#">URL 1</a></li>',
...

JavaScript Random URL

by DeathfireD, October 29, 2007 15:21, 7 refactorings, tagged with random, url, math

Outputs one of the 5 urls r...

421453710d51d7daaea8069af0aa4126 Talk
#Functions [javscript]
var ms = 0;
var state = 0;
...

JavaScript Stop Watch

by richardhealy, October 27, 2007 13:31, 3 refactorings, tagged with time, clock, speed, test, javascript

I use this to test speed of...

28e65a85a625f7c0689bcf96ccf6043d Talk
/* Set some variables */
...

JavaScript ImageFlow - something like ...

by admiralquade, October 25, 2007 14:54, 23 refactorings

Hi there, I wrote a javascr...

Ce6f4f50611af8a1a964c3cdd3edd004 Talk
function curry(fn, scope)
{
    var scope = scope || window;
...

JavaScript Curry

by richardhealy, October 18, 2007 09:34, 6 refactorings

I use this little function ...

28e65a85a625f7c0689bcf96ccf6043d Talk
(function(){

	var unicode	= {
...

JavaScript Unicode Converter

by harrydeluxe, October 18, 2007 01:43, 2 refactorings

I'm pretty sure we can figu...

059822d9f8b6e5b7c8fddc1537f00510 Talk
function mark_for_destroy(element) {
...

JavaScript Combining javascript for 2+...

by Etandrib, October 17, 2007 21:32, 3 refactorings

This is some javascript whi...

6b5a68d41436ce28831a0e0ca6bcd124 Talk
number_to_currency: function (number, options) {
  try {
    var options   = options || {};
...

JavaScript Rails-like number_to_curren...

by Barry Hess, October 16, 2007 03:18, 10 refactorings

This is pretty much a port ...

0218fde3a78fadbadb566bdb40d7b0dd Talk
String.prototype.ucfirst = function()
{
   // Split the string into words if string contains multiple words.
...

JavaScript ucfirst

by Ali Karbassi, October 08, 2007 22:41, 7 refactorings

I'm wondering if this could...

90dfcf7e54299842383ab503b6df1a65 Talk
$w('mp3 pdf doc txt rtf').each(function(ext){
  $$('a[href$=.' + ext + ']').each(function(a){
    var pageview = '/downloads' + a.href.substr(a.href.lastIndexOf('/'), a.href.length); /* /downloads/wtf.mp3 */
...

JavaScript Tracking File Downloads Aut...

by getopenid.com/deleteme, October 04, 2007 10:48, 2 refactorings

This is dependent on the Pr...

Db11d496fa96adac53b422feb6efd493 Talk
function getElementsByClass(searchClass, node, tag)
{
...

JavaScript Simple Form Validation

by Ali Karbassi, October 02, 2007 18:55, 11 refactorings

All this does is check to s...

90dfcf7e54299842383ab503b6df1a65 Talk
var d = new Date()
   d.setDate(d.getDate()-1)
   var yesterday = (d.getMonth()+1+"/"+d.getDate()+"/"+d.getFullYear())
...

JavaScript Go Back To Yesterday

by https://getopenid.com/thegenericgeek, October 01, 2007 09:58, 8 refactorings

Display yesterday's date. ...

55502f40dc8b7c769880b10874abc9d0 Talk
/***
* Beautify date to how recent the event occurred compared to now.
* Some examples:  1 second, 4 hours, 10 days, 1 year.
...

JavaScript Beautify JS Date to how rec...

by furtive, October 01, 2007 09:55, 13 refactorings

This adds a .when() method ...

55502f40dc8b7c769880b10874abc9d0 Talk
function http_object()
	{
...

JavaScript AJAX Chat Handler

by Martindale, September 29, 2007 21:20, No refactoring

This code clumsily handles ...

72f4ba51b784673a15a1e89d8d9f49d1 Talk
var Rating = Class.create();
Rating.prototype = {
  initialize: function(element, rating, options) {
...

JavaScript Rating system for this site

by macournoyer, September 29, 2007 14:09, 3 refactorings

Here's the code of the rati...

Bfec5f7d1a4aaafc5a2451be8c42d26a Talk
var Aux = {
			multiformatEditor : function(target, value, onExit)
			{	
...

JavaScript AJAX rich text widget

by mahound, September 28, 2007 00:07, 5 refactorings

I don't like this code. It ...

D41d8cd98f00b204e9800998ecf8427e Talk
Object.extend(Date.prototype, {
  isLeap: function(){
    var year = this.getFullYear();
...

JavaScript Is this year a leap year?

by Gary Haran, September 21, 2007 07:16, 16 refactorings

I'm pretty sure we can figu...

403e57e2be130d2218f992b86dfa8260 Talk
String.prototype.hello = function(){
  alert('hello world!');
}
...

JavaScript Hello World

by Gary Haran, September 17, 2007 13:09, 1 refactoring

This is simply to test out ...

403e57e2be130d2218f992b86dfa8260 Talk