And and Or in JS

The logical and (&&) and the logical or (||) are two really useful operators in JS. The following holds true: a || b results in a if Boolean(a) == true, otherwise b a && b results in b if Boolean(a) == true, otherwise a Using this one can often simplify expression a lot. For example: ...

MSE – Microsoft Script Editor

Microsoft Script Editor is probably one of the lesser known tools that can really make a difference when it comes to developing web applications. MSE is a debugger, much like Visual Studio and it comes bundled with Microsoft Office. It should not be mistaken for Microsoft Script Debugger which is a piece of crap compared ...

DOMParser for IE and Safari

A few days ago Dave over at the WebGraphics blog posted about how to parse a string into a DOM tree for Safari. I commented “How about implementing the DOMParser object in js?” and before I knew it I did it myself and adding IE compatibility on the way: if (typeof DOMParser == "undefined") { ...

XSLT in JS

I know this one is not too new but is still very interesting. Steffen Meschkat has created an XPath, XSLT and DOM engine written in pure javascript. Steffen works for Google and I believe this excellent piece of code was written in his 20 percent time to allow Opera and Safari to work with Google ...

Microsofties Don’t Get It

ClickOnce has already proved itself to be a failure and I’m pretty sure Avalon will not find its place to be on the web. At least Dare Obasanjo seems to get it.

Updated Live Search

I took the time to update the Google Live Search Greasemonkey script a bit to make it a bit more defensive. While I was messing with I also added code to update the links above the search field to go to the search terms that the last result used (instead of the search term the ...

Google Live Search

This is a script for Greasemonkey that modifies the Google search page to make the results show up as you type. Steps to install: Install Greasemonkey Once that is done you can right click the following link and select Install User Script…: googlelivesearch.user.js The Details When the user types in the search field the browser ...

Object.prototype is verboten

It is not seldom that you see people messing with Object.prototype. This is very bad because it breaks the object-as-hash-tables feature in javascript. Basically, the following is a very common scenario: var obj = {a: "A", b: "B", c: "C", d: "D"}; for (var key in obj) { doSomething(key, obj[key], obj); } if ("b" in ...

Array Extras

With the upcoming Firefox 1.1 release (and other browsers based on Gecko 1.8) things are starting to move in javascript land. During the early years of javascript a lot happend but then came the ambitious plans ofJS2 and the improvements to js just kind of died away for no reason. It seems Mozilla is finally ...

The List

Emil reminded me of Joel Spolsky’s list of things that cannot be well done in a web application Create a fast drawing program Build a real-time spell checker with wavy red underlines Warn users that they are going to lose their work if they hit the close box of the browser Update a small part ...