Mounting the bull, slowly I return homeward. The voice of my flute intones through the evening. Measuring with hand-beats the pulsating harmony, I direct the endless rhythm. Whoever hears this melody will join me. |
Thus far, the computational tasks of these pages has been trivial - a simple clock and a 'one line' calculator - but JavaScript has plenty of processing power. Click the small folder with the ? for a description of what this application does and how to use it.
WebSight:
I called it WebSight, but I could've called it the WebSight koan. It was my first real project with JavaScript, and, like our young oxherder above, I was pleased with the way it went. There's ample commentary in the html file that describes both the design of the program and its JavaScript, but here are a few comments for orientation. The major web search engines each handle their interfaces in a unique way. They differ in how they approach logic [boolean, plus/minus]; how they format phrases [quotation marks, capitals, etc]; how they send information in [post, get]; how they 'focus' a search on a particular part of their indexes [title, url, etc]. WebSight uses the plus/minus system from Yahoo! and quotation marks for phrases. The focus is handled graphically. The WebSight string is then translated into the proper format for the selected engine. The results are returned in pop-up windows so that you may reuse your search string with multiple engines.
Glance over the code now, but don't get lost in it. It's my thought that a thorough study of the details of this JavaScript will teach you how to use the language, much as the students of Zen learn from a single koan, but I am also sure that it's a 'study' rather than a 'glance over' job. Note 04/22/1999: Even koans can change! This code has been replaced with paraSite, a much more useful program. You can download it. The "koan" is the generated file paraSite.js. It will teach just as well as websight, but offer you a more useful utility for your web life.
Before you visit the code, play around with WebSight. Convince yourself that it 'works'. As you'll see when you look at the code, there's a lot of JavaScript required to translate your search strings into the necessary format. You may download WebSight for use your own computer if you wish.