Tag archive for "JavaScript"

Looking at the code I'm really not sure how it could have taken me more than one minute to figure this out.. but here's an example how to query for documents with a timestamp in the past. Your model's schema obviously needs a timestamp field of the Date type, and … more

Mongoose is quite easy to use, but modifying or annotating a query result manually is a little tricky. The problem is that the result objects are mongoose documents that can't be modified at will. In my case I was trying to change a Date type field to a human readable … more

Not too long ago I wanted to add a new plugin to my blog. During various tests I noticed something quite shocking: at least one of the plugins insisted on loading it's CSS and jquery on every page of my blog. A little more testing showed me that many plugins … more

This is about the Firefox Add-ons I use. This really is a complete list, I like to keep my browser lean. I'm fully aware that most people will miss things like Adblock, Pixel perfect and greasemonkey, but I don't use them. Usability Tab Kit: My favorite tab extension. Has many … more

I know why most people who do web design, JS coding etc. loathe Internet Explorer 6. I hate having to fix stuff for any IE at all, the web would be a better place if that piece of software just died. I welcome efforts to decrease the market share of … more

So I have decided to use the CSS3 border-radius property on some sites. They are personal projects so I don't care if they look a little worse on IE. After a few tweakings I've ended up with using things like this: #foo { border-radius: 8px 4px 4px 8px; -moz-border-radius: 8px … more

Why would I want to track clicks you may ask. Well, for me it's about usability and user flow optimization. If I do some ajax/dynamic stuff on a page, I want to see what the users are doing. As they leave no visible traces in the logs, I need to … more

You may have heard about Harmen Janssen's technique to focus input fields on pageload and keep the backspace button's history back function intact. I wanted to play with it any my first step was to mooify his ideas. So inside the domready event I simply did: function inputify(elem) { elem.focus(); … more

Today I went through the pain of installing Windows XP. On QEMU. I wanted to do some JavaScript debugging for mootools. It turned out that IE was just a little picky about list formatting. Whenever you list things, IE scripting breaks if you add a comma behind the last element. … more

Update: This post is ancient, with CSS3 and HTML5 there are much nicer ways to achieve similar things. When you use HTML forms it is often desirable to pre-fill some input fields. Your idea could be that you want to give your visitors some clue to what they're supposed to … more