Tagged with Javascript

New link for IE drip memory leak detector

I found a link to a new page for the really useful drip tool which looks for IE memory leaks in javascript code. There’s also been a new revision of the program by the guy who’s hosting it.
Published in Javascript, Tools, Web development on Wednesday, June 28th, 2006

Bookmark: web developer toolbars

Here’s a quick link for myself for the web developer toolbars you can install for Firefox and IE6. I love them because the web developer toolbars make doing clientside work so much easier. They give you tools to find out information about the page that you’re working on without having to do a million alert [...]
Published in Browsers, Tools, Web development on Monday, June 5th, 2006

Bookmark: Mozilla DOM documentation

I’ve finally found some Mozilla javascript docs that as good as the IE ones. One of the really nice thing about the Mozilla docs is they have lots of details about the versions that things work in and warnings about potential problems that you might have when using some of the features. For example I [...]
Published in Web development on Wednesday, April 19th, 2006

Using the ASP.NET 2.0 Web Resource Attribute

ASP.NET 2.0 has a really nice feature that lets you compile site or component resources like javascript files into your assembly file instead of deploying these shared files to the wwwroot/aspnet_client directory like in ASP.NET 1.x. This makes your component/website much easier to deploy because it means you can keep everything you need in one [...]
Published in ASP.NET, Server controls on Wednesday, January 11th, 2006

JSLint: neat javascript script verifier tool

I found a useful little utility called Lint that checks for things in your javascript code that’s likely to introduce errors. I really like that it checks for undeclared variables because I always, always, always want to declare my variables before I use them. Considering that forgetting to declare the variable sets it global for [...]
Published in Javascript, Tools on Monday, August 15th, 2005

Measuring element dimensions and placement in javascript

I found a really useful page on the MSN site that explains how measuring element dimensions and locations work in javascript. There’s a great image that shows you how to measure any of the different areas using the different javsacript width, height and placement properties.
Published in Javascript on Thursday, August 11th, 2005

Back referencing in javascript regular expressions

I’ve used regular expressions to do find and replace Javascript before, but I’ve never managed to do the thing where you can take part of the string that has been matched and use it in the replace string. It turns out the piece of the puzzle I needed to find was something called back references. [...]
Published in Javascript on Thursday, July 21st, 2005

Debugging clientside scripts in VS,NET 2003

How interesting! Turns out that VS.NET 2003 actually supports debugging of clientside scripts! I’m going to miss the javascript alert function. :)
Published in ASP.NET on Thursday, February 10th, 2005

Automatically initialising Javascript objects that require the DOM

One of the problems I had when I first started creating Javascript widget objects is that I always needed to create the object in two stages. First I’d actually create an object with the correct parameters, then I’d register a piece of script that actually did all of the initialisation code that accessed the DOM [...]
Published in Javascript on Tuesday, November 23rd, 2004

A DOM friendly way of getting values from radio buttons

The problem with radio buttons is they don’t work like ordinary form elements. You can’t just apply an ID to a radio group, use document.getElementById() to get a reference to it and then query the value. This means to find the value of my radio group I’ve had to use the old fashioned document.forms[0].groupName method [...]
Published in Javascript on Wednesday, November 17th, 2004

DOM-created radio buttons don't work in IE6

*sigh* This is a nasty little known problem with IE when creating radio buttons using document.createElement(). IE actually creates the buttons, but they can’t actually be selected by the user. The problem is that aparently IE doesn’t let you set the name attributes of elements after they’ve been created. If you update the name attribute, [...]
Published in Browser quirks on Saturday, October 23rd, 2004

Truths of the universe..

..it’s easy when you know how :) Just spent the best part of an hour discovering that in ASP JScript you have to do query(“field”).Value to get the value of the field as a “real” jscript object that you can compare to null. I love ASP!
Published in Web development on Tuesday, September 14th, 2004