• Lazy Programmers?

    by  • 17 October 2006 • PHP • 0 Comments

    I’ve always been of the belief that there’s a basic level of functionality that a web form should present, and after that you can use javascript or even some Ajax to enhance whatever it is you’re working on. For instance, take the index page at my bank’s website. It only has one form on it, for logging into your “internet banking.” But you have to grab your mouse and navigate over to the web form and click on it in order to set the focus there.

    How hard would it be to set a JavaScript action on page load- to define a focus on that form element? Sure, it may not help everyone, but it’d certainly help 90 percent of the users (a figure I just pulled out of thin air). It might even help some ADA issues with different mobility options.

    In a related note, how many times do I have to type in my city, state and zip code? Many. And there’s javascript or server-side scripts all over the place to confirm that yes, zip code A is valid for City B in state C. But what about the other direction? If you ask the user to type in their zip code, you can automatically populate the city and state, couldn’t you?

    That’s the approach I took here.Note, this is a live tool for the Community of Welcoming Congregations; submitting the form won’t be helpful for them. When the page loads, everything is normal. But then when it’s finished, a Javascript fires off that sets the city and state to ‘disabled.’ When the user updates the zip code, the city and state are pulled from the server and stuck into the fields, and the fields are made editable again. If there’s any problem, an alert box pops up asking the user to double check the work.

    It wasn’t that much work; I downloaded a zipcode database and wrote the adjoining javascript functions. And it has the possibility of saving the user those few ergs it takes to bang the keyboards; but more importantly, it helps the user with a menial task that could have been solved so much easier.


    I was seduced by the dot-com promises of high profits and fun work environments. I became dissillusioned and left the company after learning PHP and MySQL and Linux administration (I started with Slackware). The knowledge was a reasonable trade for not being paid for several months. I enjoy helping people get their presence on the web- I'm good with e-commerce, data scraping and repurposing, and general day-to-day management. I'm a creative thinker with a passion for creating useful ways to view information. I live in Portland Oregon with my lovely wife and two daughters. We have cats, dogs, and an overgrown yard.


    Leave a Reply

    Your email address will not be published. Required fields are marked *