October 22, 2008

Problems submitting a form via 'enter' in IE

Like many things, handling form submissions with ColdFusion can be done many many ways. A preferred method which I’ve been using for years now is looking for a specific element in the form struct. Something like: <cfif structKeyExists(form, "myelement")> <!--- handle form submission here ---> </cfif> Most times I use a hidden field as the form element to look for (in my structKeyExists()), but I came across something funny today where I happened to be looking for the name of a submit button. ... Read more

July 8, 2008

Kotatsu - a simple html table generator

Sometimes you want to create an HTML table by hand and don’t have the luxury (if you consider it a luxury!) of having Dreamweaver around. Of course, creating HTML tables really isn’t all that difficult or time consuming, but considering we use snippets for just about everything else why not have a tool to generate these tables for us? Kotatsu is an online tool to do just that, sure it is very simple (doesn’t support col/rowspans or accessibility attributes etc) but when you want to churn out a basic custom table it just might save you some time. ... Read more

January 24, 2008

When to use form POST vs GET?

I read a post today from Mark Kruger where he was warning against the possible side effects when using GET as a form submit method. I think I (unintentionally) offended Mark with my comment where I asked why would anyone EVER use GET? because I pretty much always use POST so was wondering why you would use GET. In my search for answers I asked Mark Lynch who seems to always have the answer to my questions :) ... Read more

March 25, 2007

The 'coolest' DHTML calendar

As web developers we are often some of the first people to see the newer techniques and tools available for use in web applications. This can be great as we can then hurry off and implement these things into our new projects. But of course there are still millions of older sites (which will no doubt still be around for years to come!) using old techniques and tools. Ugh! One of the more common things you find is the age old popup calendar window which is SLOW and could be blocked by the numerous popup blockers out there today. ... Read more

December 7, 2006

Including js files from within js files

I’m working on an application which stores a lot of data in the application scope. Part of the data stored is a config CFC that has a method which loads ‘external assets’ (javascript and css files etc) into the of the html document via . I love that tag :) My part in this application development is limited to a particular section only, but there was already a lot of external assets present in the header and things were getting very messy. ... Read more

December 4, 2006

Viewing AJAX generated source code

When developing for the web there is often a need to view the (X)HTML source code of a page to see exactly what ColdFusion (or your server side language of choice) is generating from the server. One of the problems you might face is when viewing the source code of an AJAX generated event. Of course AJAX being asynchronous means that the page doesn’t reload in the browser, so viewing the source code doesn’t allow us to see the content which was generated by our AJAX call. ... Read more

November 9, 2006

Reserved characters in HTML 'id' attribute

Currently I’m building an app which will accept metadata from different sources, translate that into an API to dynamically build an HTML form from. Everything is going just dandy until my page stopped validating (I use tidy to validate my markup) when I got the following warning: After some digging I discovered that the value of the ‘id’ attribute in not simply a string which you can put anything into. I found this on w3c: ... Read more

November 8, 2006

Browser testing your site design

I’ve often used browsercam for testing my sites in different browsers on different operating systems. So I can pass a URL (which must be publicly available) and see screenshot results on Windows, Linux and Mac across just about any browser you like…from Flock to Firefox and Safari to Konqueror. A full browser list can be seen here. Now browsercam is also cool because it lets you devicecheck, meaning testing your site on Blackberries or Windows Mobile…nice :) Only problem is that browsercam is commercial, so if you’re a sole trader you may not have the budget for what is such an ESSENTIAL part of web development. ... Read more

October 20, 2006

Building accessible tables

These days all the rage is building web pages without tables, but has this gone too far for a lot of developers? I’m of the opinion that HTML tables shouldn’t be used for layout purposes and I think most would agree, if you don’t please let me know because I’d love to hear the reasoning :) There is however a quite valid and obvious for using tables, that being where the content contains tabular data. ... Read more

October 2, 2006

Web Standards - rooting for the underdog

Roger Johansson wrote a nice article on why web standards still matter. He notes that recently there has been an increased level of interest and activity around web standards, but those that do strive for excellence in their code (i.e. web standards) are in the extreme minority. I would tend to agree with this, take his example: I encourage anyone who thinks we do not need yet another article or book on Web standards, CSS, accessibility, graceful degradation, progressive enhancement, or anything else related to best practices, to take a quick look around you. ... Read more

© Michael Sharman 2017