chapter31

development in a land far far away…

at the moment

History is not what happened. History is what was written down.

Archive for September, 2006

Firefox Web Developer Toolbar

Friday, September 29th, 2006

Scott Stroz (aka boyzoid) has a nice little post on the Firefox Web Developer Toolbar by Chris Pederick.
The toolbar (which has been around for ages) is a must have for any web developer, I thought I’d post some of the tools including their shortcuts which I use regularly.
CSS

Viewing CSS - Ctrl+Shift+C
Opens up a new […]

Read the rest of this entry »

Javascript parseInt() quirk

Thursday, September 28th, 2006

I ran into a little quirk or ‘bug’ today when using parseInt() with a string (input from a text box). Now as we all know parseInt() parses a string and returns an integer value.
The scenario: I was working on a legacy application where a user could pass a date to the server in 3 separate […]

Read the rest of this entry »

<cfhtmlhead>

Monday, September 25th, 2006

Sometimes during development you may want to programmatically add text/content to the <head> area of the currently processing page. Most often I do this when I want to add Javascript code or link tags dynamically.
<cfhtmlhead> is a great tool to use for this as you don’t need to try and spaghetti code your header include/module.
For […]

Read the rest of this entry »

Trimming strings with Javascript

Tuesday, September 19th, 2006

Ben Nadel has a nice post on trimming strings with javascript using regular expressions.
Note that the reg exp white space character ‘\s’ is used to match:

space
tab
horizontal tab
vertical tab
line break

Sample code below:

// Trims the beginning and trailing white space from a string.
function trim( strText ){
return( strText.replace(new RegExp(”^([s]+)|([s]+)$”, “gm”), “”) );
}

// Trims the beinning white space from […]

Read the rest of this entry »

Robots META tag

Tuesday, September 12th, 2006

The Robots META tag is a way you can tell ‘Robots’ or ‘Spiders’ whether a page (or pages) on your site should be indexed, or if links on the page should be followed.
At this stage I don’t believe all ‘robots’ out there support the use of this META tag, but some do so in the […]

Read the rest of this entry »