Archive for JavaScript

Drip: memory leak detector for IE

I found out about Drip through John Resig’s Secrets of JavaScript Libraries panel at SXSW this year. Unfortunately I couldn’t attend his panel, but the presentation document seems like a good read.

Anyway, Drip is a memory leak detector application for Internet Explorer. It basically runs IE within the application itself, and analyzes the memory usage for any leaks. Seems really really useful, and just by playing with it for a few minutes I already found a couple of pieces of code to fix.

Prototype / script.aculo.us book

We purchased a copy of this book a few months ago when it was still being written, so we got some “beta” copies of it in PDF format. It’s a very good book, with way more detail than what you can find in the Prototype documentation site.

Highly recommended.


Lightview == lightbox based on Prototype

Lightview seems like a really cool piece of JavaScript code. It’s very similar to the original lightbox script from Lokesh Dhakar, but it also supports other types of media. I remember a few years ago when the lightbox hack was announced, and how cool it was too.

One other cool thing about Lightview is that it is built on top of Prototype and script.aculo.us, so it might be a very good option for developers already using these popular libraries (like me!).

Google Gears 0.2 released

Google Gears 0.2 has been released and it is now available for developers. This is a really cool tool for web developers, especially the offline browsing capabilities. They have an announcement with the changes for this release on their weblog.

A few months ago I played a bit with it and implemented offline caching for a Wiki system I was working on, and it worked pretty well. I need to get some more free time and use the SQLite features.

Changing image src attribute reliably in Internet Explorer

I just spent quite a bit of time debugging this silly problem on Insightory.com, where the document control buttons were not working under Internet Explorer. Since it might be useful to somebody else, I’m going to document the solution here.

The problem was that the document browsing control buttons, which look like the following:


<img src="/blog/browse_controls.png" />

They were implemented by doing something similar to this:


<a href="javascript:void(null);" onClick="javascript:openNextPage();" class="nextpage"><img src="/images/nextpagebutton.gif" alt="Next page" /></a>

And then inside the openNextPage function, I swap the image by changing the src attribute of the image tag. Pretty standard, and works perfectly under Firefox.

Long story short, the javascript:void(null); bit is what is breaking Internet Explorer (IE6 on this case). Changing the XHTML code to look like the following fixes the problem completely for me:


<a href="javascript:openNextPage();" class="nextpage"><img src="/images/nextpagebutton.gif" alt="Next page" /></a>

I found out the culprit by (obviously) searching Google for a long time, and then finding this thread on WebDeveloper.com.

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »