SUBSCRIBE VIA RSS


Subscribe to our feed

Status Updates

  • First iPhone app nearly complete! I've been waiting for 3 weeks for Apple to finish "conducting company identity verification."
    1 day ago
  • Rainy day! Staying indoors. Creating computerized players in a simulation game that models cooperation in the work place.
    73 days ago
  • Up at 8AM, with a hot cup of coffee brought back from Cafe Lola in Ann Arbor. Will I succeed in putting in 8 billable hours in one day?
    99 days ago
  • full scale irish band outside my window playing the pipes for the past 20 minutes. pretty fun.
    107 days ago
  • listening to Kristin on Maxim Radio!
    113 days ago
  • back from an amazing meal at ouest with even more amazing company.
    114 days ago
  • wondering how so many online tshirt companies stay in business--ones that sell shirts with funny messages, i never see them in real life
    120 days ago

Topics

TWITTER

The old fashioned way

RECENT TUNES

  Javascript Articles

November 21, 2008 – 5:39pm Javascript get window hash/anchor, get link target

There are two functions I find myself using all the time. They are very useful for javascript events that read the link href attribute to determine an action’s target. More…

Posted in  Uncategorized   |     |  2 Comments »   |  delicious  Digg

October 24, 2008 – 5:01pm IE6 mouseover event not firing, png filter

This took me way too long to figure out. I had a series of div tags that had mousover and mouseout events attached to them using prototype. I couldn’t get these events to fire in IE6 no matter what I tried! Events worked on links, but not any other element.

First thing to check: Are you using the png filter trick?
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop src='/images/white_bg.png');

If so, make sure your mouseover elements have “position:relative” or else the event won’t fire on any element inside another element with the png filter.

This post along got me on the right track.

Posted in  Uncategorized   |     |  No Comments »   |  delicious  Digg

June 5, 2008 – 12:50pm Get value of radio button group using prototype

If you want to get the value of the selected element of a radio group, prototype makes this easy. There is more than one way to do it. I’ll update this post as better methods surface. Check out code after the jump.

More…

Posted in  Web Development   |     |  6 Comments »   |  delicious  Digg

August 15, 2007 – 3:25am Stereolabels released: updated labels.js for Prototype

Stereolabels unobtrusively places form input labels inside the form inputs themselves. Upon page load, the script crawls the DOM for labels with the specified class name (default is ‘inside’) and places the label text inside the input field. Upon clicking the field, the label is removed. When the element loses focus, if there is no input the label returns. This behavior is only applied to text, textarea, and password input fields.

Information and a download are available in our code section: Stereolabels

Posted in  Web Development   |     |  No Comments »   |  delicious  Digg

July 26, 2007 – 11:31am sfCombineFilterPlugin released: Combine js and css requests into single compressed files

The sfCombineFilter plugin automatically combines included js and css files in your web response into one request each, passing the string of file names to a special php file that concatenates them and compresses them for faster delivery. This file is then cached for future use.

Information and download instructions are available in our code section: sfCombineFilter

Posted in  Web Development   |     |  1 Comment »   |  delicious  Digg

July 23, 2007 – 8:45pm Prototype Tabs Script released, Scriptaculous Optional

We just released a small script that allows you to easily create tabbed content on your web sites with a nice fade effect. Having searched for a decent script that uses prototype.js and scriptaculous to quickly create tabbed inline content and not having found one, we were inspired to create our own, much as stickmanlabs did with the accordion script. Check out the prototype tabs demo.

Posted in  Web Development   |     |  5 Comments »   |  delicious  Digg

July 19, 2007 – 2:36am Javascript Array Merge: array_merge

Using protoype.js I discovered a quick way to merge to arrays in javascript:

function array_merge(one, two) {
  one.push(two);
  return one.flatten();
}

This definitely beats the alternative of iterating through the second array by hand and adding it to the first. Any comments or suggestions are welcome.

Posted in  Web Development   |     |  8 Comments »   |  delicious  Digg

May 14, 2007 – 2:14am javascript urlencode

In doing a google search for javascript urlencode, I realized I was using that terminology just because I was familiar with the PHP function of the same name. Javascript’s method is actually called encodeURI() which will encode all characters except:

, / ? : @ & = + $ #

But what I really wanted to do was get javascript to convert a string that would be okay to put into a query string of a URL. For this, use encodeURIComponent(). This will convert all characters except alphabetic, decimal digits, and:

- _ . ! ~ * ' ( )

That’s more like it. You can view the complete reference at mozilla or w3schools.

Posted in  Web Development   |     |  5 Comments »   |  delicious  Digg