Brake Joke
One day this mechanic was working late under a car and some brake fluid dripped into his mouth. "Wow! That stuff isn't too bad tasting," he thought.
The next day he told his buddy about tasting the brake fluid. "Not bad," he said. "Think I'll have a little more today." His friend got a little concerned but didn't say anything.
The following day the mechanic told his friend about drinking a cup full of the brake fluid. "Great stuff! Think I'll have some more today." And so he did.
A few days later the mechanic was up to a bottle a day, and told his friend, "This brake fluid is really great stuff." His friend was now really worried. "You know that brake fluid is poison and really bad for you. You better stop drinking that stuff."
"Hey, no problem," the mechanic replied. "I can stop any time."
Auto Complete JavaScript
I have been working on an auto complete JavaScript function. It is still in the testing phase, but it works with the major browsers that I tested so far.
The code creates a list of options from an array. How the matches are made can be adjusted to find text anywhere in a string or the exact say way the user wants it. You can also ignore case too.
There will be more options added to it in the future.
You can read more about it and download the codehere:
AutoComplete Type Ahead Example
If you want to see more options, add a comment here.
Eric Pascarello
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for Dynamic Web Pages
<input type="text" name="txtIgnore" style="display:none;">There is another method of using the onsubmit handler, but is is messy.
Eric