Monthly Archives: September 2006
- September 29, 2006
- Firefox Web Developer Toolbar
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.
CSSViewing CSS – Ctrl+Shift+C
Opens up a new [...]
- September 28, 2006
- Javascript parseInt() quirk
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 [...]
- September 25, 2006
- <cfhtmlhead>
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 [...]
- September 19, 2006
- Trimming strings with Javascript
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 breakSample code below:
<script type="text/javascript">// 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 [...]
- September 12, 2006
- Robots META tag
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 [...]
