Web development

Handling SelectedIndexChange for a DropDownList in a Repeater on 25 Jan 05 (5 comments)

Came across an interesting problem yesterday trying to handle the SelectedIndexChanged event for a DropDownList that was inside a Repeater. I found a wonderful article on Databinding that gave me most the information I needed, but their method of handling events just didn’t work for me. My first problem was that I originally did the [...]

Macromedia Flex on 11 Jan 05 (Add comment)

Just read an interesting article about a new Macromedia tool called Flex. It seems to be somewhere between a flash application and a classic web app. The really cool thing about it is that it runs on top of existing platforms like .NET and J2EE and can be developed in eclipse or visual studio. Developers [...]

Social networks on 15 Dec 04 (Add comment)

Interesting article by Dare Obasanjo about Social software. I think the lock-in he’s talking about creating is something that benefits companies rather than users. Is having your blog, photo-sharing, IM and email all through the same company actually a benefit if it means in a few years time you can’t try something new because you [...]

XMLHttpRequest and Google suggest on 13 Dec 04 (Add comment)

Wow! I didn’t even know about the XMLHttpRequest object that powers Google suggest. This is the first thing I’ve seen in *ages* that seriously changes how we can make webpages. :) I’m so glad that the web is still an exciting place to hang out.

Disabling animated gifs in firefox on 08 Dec 04 (Add comment)

Animated gifs drive me absolutely crazy. To turn them off in firefox: 1. Type “about:config” in the location bar 2. Find the “image.animation_mode” parameter and change it to “once” or “none” Have I mentioned how much I love firefox? Power to the people! The geeks shall inherit the earth. Reference: Post in the UserFriendly forums

HTML doctypes on 07 Dec 04 (Add comment)

I can never remember these things. This is a list so I (or you) can just cut and paste into pages. HTML 4 transitional: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> HTML 4 strict: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"> XHTML transitional: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> XHTML strict: <!DOCTYPE html PUBLIC "-//W3C//DTD [...]

The net's an amazing place :) on (Add comment)

See two of my favourite technologies combined: Amazon.com and MSN messenger! I don’t know if it’s useful, but it sure is cool! Another interesting find for today was googleblog.

Creating tags with non-literal data in XSLT on 03 Dec 04 (Add comment)

If you’re forced to work with a schema where the tag names contain derived data (node position in this case) you can create your tag names in XSL using the element tag: <xsl:element name="{concat(‘mytagname’, position( ))}"> <xsl:value-of select="mytag"/></xsl:element>

Finding position of the parent node in XSLT on (1 comment)

Here’s a really nifty solution to the problem of finding the position of a node’s parent node from the comp.text.xml newsgroup. The idea is you can find the position of the parent node by you counting all its preceding siblings. <xsl :value-of   select="count(parent::bar/preceding-sibling::bar) + 1"/>

Automatically initialising Javascript objects that require the DOM on 23 Nov 04 (Add comment)

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 [...]

Keep it simple on (Add comment)

Adam Bosworth talks about how the value’s in the content not the technology.

A DOM friendly way of getting values from radio buttons on 17 Nov 04 (Add comment)

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 [...]

Jumping to anchors in table cells on 26 Oct 04 (Add comment)

Interesting IE observation: You can’t jump to anchors in otherwise empty table cells. This works: <tr>     <td>&nbsp;<a name="myanchor"></a></td> </tr> This doesn’t: <tr>     <td><a name="myanchor"></a></td> </tr> I know I’m doing terrible things to my markup to even want to put an anchor in an empty table cell.. :) Other people seem to [...]

DOM-created radio buttons don't work in IE6 on 23 Oct 04 (Add comment)

*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, [...]

PNG Alpha transparency code in IE on 19 Oct 04 (Add comment)

Because of incompatibilities between IE and the world, to get PNG transparency to work in IE you need to add this to your stylesheet: img.transparent { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’myimage.png’,sizingMethod=’scale’);} There’s more information at A List Apart and WebFX

The problems with playing the system on 09 Oct 04 (Add comment)

I’ve been thinking a fair bit about search engine optimisation lately since I started looking at url rewriting for one of our customers at work. Before I start my rant I’d like to say I’m not talking about the type of search engine optimisation that makes the quality content of your site more meaningful for [...]

Accessing current style attributes on 07 Oct 04 (Add comment)

Had a problem this morning trying to access the display property of html form elements that were hidden because one of their parent elements had the style.display property set to “none”. <tr style=”display:none”> <td><input name=”foo”/></td></tr> My script worked fine when I called document.getElementById(“moo”).style.display on the elements whose display property I had set to “none”, but [...]

Setting up custom 404 pages on apache on 20 Sep 04 (Add comment)

Enabling htaccess on apache: 1. Open httpd.conf (in <apache_dir>/conf directory) 2. Find the <directory> for the directory you want to change it in 3. Change AllowOverride None

CSS2 @font-face threatens to make our pages prettier on 16 Sep 04 (8 comments)

It’s funny the way the universe echos sometimes. While I was walking to lunch yesterday I was thinking that it was high time developers got more choice about the fonts that their webpages display in. I mean we live in an age where bandwidth restrictions have relaxed so much there’s video linked from the homepage [...]

2.7 million uk emails for £270! Woo! on 15 Sep 04 (Add comment)

I wonder if people who buy spam lists from spam emails ever find their own names on them. :)

Truths of the universe.. on 14 Sep 04 (6 comments)

..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!