">'); win.document.writeln(''); win.document.writeln(''); }

The Indefinite Article.

Wednesday, March 02, 2005

Pure JavaScript Forms: Step Two

One of the things I periodically ask myself is "what was it that I was doing before I forgot what I was doing?" In some ways, my learning of JavaScript in making pure JavaScript forms has brought me to that point. In step one, I made one straight html form that could serve a few different contexts and a script that would hide or reveal the portions of the form germane to each context. The purpose of this is to eliminate server-side scripting from the html guts of the form. Since JavaScript can use the Document Object Model (DOM) to modify the form without placing any code within it, it is an ideal technology to act as a glue behind the server-side brains that determine the form context and what should be placed in the form, and the client side html.

In step two, I've delved deeper into JavaScript and figured out how to do a few things: write or set values into the form items, place arbitrary message text within a cell of the form table, and color rows of the form table. The latter two are important because a form needs to let a user know if they left something important blank through a text message and visual cue.

So the final step is to clean up the variables and deploy it.


Post a Comment

<< Home