JavaScript Demos:
rev. November 26, 2001 |
|
|
This is your opportunity to face the White-Bull-That-Is-Paper-With-No-Words-On-It. Discussion.This idea is taken from the book "The Best of Bad Hemingway," George Plimpton (intro.), [1989], Harcourt Brace Jovanovich, paper, ISBN:0-15-611861-0. That is a collection of parodies of Ernest Hemingway, mostly entries in the Imitation Hemingway Competition sponsored for some years by Harry's Bar & American Grill. Hemingway, BTW, did not like to be parodied. He once said, "The step up from writing parodies is writing on the wall above the urinal." To submit your imitation, see the current competition. And some previous efforts are online. See also the Bad Hemingway page. The JavaScript in this example is modeled closely on Heinle's "MadLibs" in his Designing with JavaScript book. It shows information entered via simple text on HTML Forms can then be rearranged and output in a new window. The use of JavaScript to create a new window from forms-entered information is the important thing, despite the misdirection applied to your attention by the subject matter. Please note the following:
A more practical use of this technique would be to allow a visitor to confirm data they they'd entered on a form. You can take the information and re-write it for them to look at and allow them a chance to go back and make a change before continuing. That would also allow them to print or save a summary of the activity involved. But that requires some additional techniques, particularly use of the "onSubmit" event handler.
Return to JavaScript Course page. |
|