Michael J.A. Clark
Michael Clark is a Computer Science student from England providing freelance programming and design when not studying at Cambridge. Skills: C#, Sitecore, PHP, XHTML, CSS, AS3, Java, ML, F#.

Sections

Contact details

Email
mjac@mjac.co.uk
Skype
mjacdotuk
Twitter
mjacuk

Input forms

At the basis of most websites and applications there is a solid input mechanism. I’m currently thinking about what system to use for my applications; with every type, there are many obvious disadvantages.

  • HTMLArea is a great solution, but it doesn't work at all in Javascript-disabled browsers! For instance, I may want valid HTML input, but if Javascript is disabled, the user would have to type <p></p>. This would put people off posting and sending messages.
  • Plain input is fine, generally, however it isn't represented properly in the browser: the user has to do a preview of the post.
  • BBCode has to be learned, and doesn't produce invalid semantic markup.

I am going to have to use HTMLArea. It provides so much functionality and usability: nothing else is really an option. To make input less frustrating for users without Javascript, I'll provide the automatic addition of <p> tags around unenclosed content. This will fix the most common errors.

Smiles are a problem. I am abstracting representation from programming therefore relative location identifiers cannot be used. The best alternative to this is to use a boolean to determine whether smiles should be used (in each post), and then replacing them client-side using JavaScript.

Comments