Tuesday, February 17, 2009

Handy Firefox plugin

This was pointed out to me today - Window Resizer allows you view your own browser in different resolutions. Not everyone has a massive 30" display!! I've definitely made the mistake in the past to develop for just my own resolution. Would be really cool if automated testing frameworks like D'OH or Selinium could be integrated with this plugin so you could run your test suits against a list of resolutions you need to support.

Google Analytics has a sub tab which lets you know the screen resolutions of your visitors. Its under Visitors -> Browser Capabilities -> Screen Resolutions.

Sunday, February 8, 2009

dojo and the enter key

Attaching a listener for the enter key on a form can help a lot from a usability perspective. If your users are more familiar with tabbing through a forms using only keys, asking them to use the mouse just to submit the form can be a little irritating. dojo comes to the rescue with a simple dojoattachevent. All you need to do is add the a dojoAttachEvent to your template file:

dojoattachevent="onkeyup: checkForEnter"

Then, in your widget logic, all you need to do is:

checkForEnter: function(keyEvent) {
if(keyEvent.keyCode == 13) {
if(!dojo.isFF) {
if(this._validateForm()) {

Oddly enough, Firefox is able to recognize the enter key and submits the form all by itself.

dojo campus has quite a few keys defined so you can capture a lot of what your users are trying to achieve with your web application.