Steve's Blog
Random thoughts for myself
Tuesday, May 06, 2008
Sunday, May 04, 2008
Thursday, April 24, 2008
Today I try to become a behavior-driven developer
It won‘t happen without cost, but now that I have established myself here, I am going to try to be more behavior-driven developer.
http://jbehave.org/documentation/two-minute-tutorial/
Assorted Progressive web sites
thinkprogress.org - good tag cloud, what we are for and against on
right sidebar
reason.com - libertarian, pro-gun-ownership. MAtt Welch is editor of
the magazine.
afterdowningstreet.org - focussed on impeachment of Bush/Cheney and
Iraq war. Narrow topics perhaps?
Wednesday, April 23, 2008
Tuesday, April 22, 2008
Monday, January 07, 2008
Thursday, October 26, 2006
Pattern for blurring form values
I wrote some general routines for doing form blur values in
prototype-extensions.js,
extending the Form.Element object.
In our Javascript pages, if we write
Form.Element.blurValue($('inviteForm.inviteeFirstName'), 'First name');
Form.Element.blurValue($('inviteForm.inviteeLastName'), 'Last name');
Form.Element.blurValue($('inviteForm.inviteeEmail'), 'Email address');
and if we validate with:
EntregeValidationUtils.assertNotEmpty.bind(this,
$("inviteForm.inviteeFirstName)()
then we get the following behaviours:
1. The blur value is set up as the default value shown on page load
2. The blur value disappears and reappears when onFocus and onBlur
events occur
3. The blur value is considered an "empty" value, and validation will
fail if the value equals the blur value.
This minimizes the code we have to write in the Javascript page.
Steve.

