Welcome to the Blog of Simon Bingham

Adding a row to a table containing form fields using jQuery

The following example shows how to add a new row to a table containing form fields using jQuery. Firstly, create a table and a button that will add the new table row when clicked. <form> <table> <thead> <tr> <th scope="col">Track</th> <th scope="col">Album</th> <th scope="...

Published: Friday 06 January 2012 | Comments: 0 | Read more »

HTML jQuery

My new year's resolutions for 2012

Beyond making an effort to be happier, nicer to people and less stressed I am not a big fan of new year's resolutions. However, from a programming point of view, there are a few things I plan to do this year. I've listed them below so I can review my achievements (or lack of) in a year's time. Read the following books which I purchased recently from Sitepoint: jQuery: No...

Published: Sunday 01 January 2012 | Comments: 0 | Read more »

ColdFusion HTML jQuery CSS

Importing data from a spreadsheet to a database table using ColdFusion

I'm currently working on a project where I need to import a list of products from a spreadsheet into a database table. Here is the ColdFusion script I have writted to complete the task. <!--- read the spreadsheet data into a query object ---> <cfspreadsheet action="read" src="#ExpandPath( './data.xlsx' )#" query="importdata" headerrow="...

Published: Friday 23 December 2011 | Comments: 2 | Read more »

ColdFusion

Converting a string to title case in ColdFusion

The following function takes a string and converts it to title case. <cffunction name="titleCase" returntype="string" output="FALSE"> <cfargument name="str" type="string" required="TRUE" /> <cfset var newstr = "" /> <cfset var word = "" /> <cfloop list="#arguments.s...

Published: Thursday 22 December 2011 | Comments: 9 | Read more »

ColdFusion

How to make a telephone number clickable on iPhone or Android

To make a telephone number clickable on an iPhone or Android device simply wrap it in an HTML <a> tag. When the link is clicked the device's phone will be activated. Don't forget to prepend 'tel:' to the link. <a href="tel:+440000000000">00000 000000</a> ...

Published: Thursday 15 December 2011 | Comments: 2 | Read more »

HTML iPhone Android

ColdFusion ORM paging in FW/1 (Framework One)

Firstly, in your Handler add maxresults and offset keys to the RC structure and give them some default values. Maxresults is the number of results to be displayed per page and offset is the number of rows to skip. For example, if the value of both maxresults and offset is 10, records 11 to 20 will be displayed. By default we'll want the value of offset to be 0, but you can set the value of ...

Published: Monday 05 December 2011 | Comments: 0 | Read more »

ColdFusion FW/1

Integrating Gravatar with your blog

Today I integrated Gravatar with my blog so, for commenters who have a Gravatar account, you'll now see an avatar next to their blog post comments. As long as you have a commenter's email address it's very easy to display their avatar. In Coldfusion simply convert the commenter's email address to lower case, hash it, convert it to lower case again and add it to an IMG ta...

Published: Friday 02 December 2011 | Comments: 3 | Read more »

ColdFusion HTML

Moving page elements using jQuery

I'm currently working on a project to convert a web site to a responsive design. On mobile devices I want the primary page content to appear near the top of the page with other (less important) content below. For the site in question I can get so far using CSS to reposition page elements. However, when CSS won't do the job I've used jQuery to detect whether a mobile device is be...

Published: Wednesday 23 November 2011 | Comments: 0 | Read more »

jQuery CSS Responsive Design

Making your web site's navigation mobile friendly

I am currently working on a project to convert a web site to a responsive design. The site's navigation has a lot of links arranged in list format so, rather than displaying the navigation in list format on mobile devices which would push the page content off the screen, I thought I would use jQuery to convert the navigation to a select list if a mobile device is being used. Here's how ...

Published: Wednesday 16 November 2011 | Comments: 0 | Read more »

HTML jQuery Responsive Design

Foundation: Rapid prototyping and building framework

Today I finished integrating Foundation framework with my blog. Foundation describes itself as 'an easy to use, powerful, and flexible framework for building prototypes and production code on any kind of device'. And, as long as you have a knowledge of HTML and CSS, and at least a basic understanding of the principals behind responsive design, Foundation is very easy to use. Fortunately...

Published: Friday 11 November 2011 | Comments: 0 | Read more »

HTML jQuery CSS Responsive Design