Site of the Day 8/19/2010

Here is a good site for learning about HTML 5.

Site of the Day 8/1/2010

Here is a good article about JavaScript functions and how they work.

Part I:

Part II:

Site of the Day 7/28/2010

Here is the page of the guru of the jQuery project.

Cheat sheet for jQuery

Site of the Day 6/28/2010

Here is the main page for the jQuery project.

Site of the Day 6/24/2010

Here is a good video on how to understand the internals of jQuery.

Site of the Day 6/23/2010

15 Great jQuery Plugins For Better Table Manipulation

Site of the Day 6/22/2010

I’m going to start to add some resources for the JavaScript framework called jQuery.

Site of the Day 5/29/2010

Here is a good JavaScript site concerning the importance of performance.

Site of the Day 5/27/2010

I’m glad I found this link when I was sitting down. 🙂

How to do a type ahead for a select tag

I thought I would put some code here on how to do a type ahead for a select tag (select-one) using JavaScript.
*** WordPress made my “8” as a smiley face, so just replace it.

1.) Add these 2 event handlers to a given select tag.

onblur=”_dw_select_typeAhead_clear(); ”
onkeydown=”_dw_select_typeAhead(); ”

2.) Add this global variable to keep the status of the type ahead.

// global storage object for type-ahead info, including reset() method
var taInfo = {
reset:function() { this.last=0; this.charsTyped=”;  }

3.) Add this function to initialize some global variables at the onchange event handler.

// ===============================
// clear variables for type ahead
//  ===============================

function _dw_select_typeAhead_clear() {

taInfo.charsTyped = ”; taInfo.last = 0;
} // end of type ahead clear…

4.) Add this function to show the location were the user is as they type the characters.

// =====================================
// type ahead for select drop down
// =====================================
function _dw_select_typeAhead() {

  var v_len = 0; var v_len1 = 0; var v_event = window.event;
  var txt; var charCode; var val;
  charCode = v_event.keyCode;

// escape key will clear the type ahead buffer and allow the user to start over
  if (charCode == 27) {
   _dw_select_typeAhead_clear(); // clear
 _dw_select_typeAhead_startover(); // options[0]
   v_event.returnValue = false; return true;
  if (v_event && !v_event.ctrlKey && (v_event.keyCode > 19 || v_event.keyCode == 8 ) ) {
     var now = new Date();
     if (taInfo.charsTyped == ” || taInfo.charsTyped != ”) {
        var ddl = v_event.srcElement;
        taInfo.last = now;
     // correct for NumPad digits
     if ( charCode >= 96 && charCode <=105 ) { charCode = charCode – 48;   }
     if ( charCode > 127 ) { charCode = charCode – 144; }
     if ( charCode == 8 ) {
        v_len1 = taInfo.charsTyped.length – 1;
        taInfo.charsTyped = taInfo.charsTyped.substr(0,v_len1);
     } else {
           taInfo.charsTyped += String.fromCharCode(charCode).toUpperCase();

window.status = taInfo.charsTyped;
  ddl.title = taInfo.charsTyped;
     v_len = ddl.options.length-1;
        for (var i=0; i < v_len; i++) {
         txt = ddl.options[i].text.toUpperCase();
      val = ddl.options[i].value.toUpperCase();
            if ( txt.indexOf(taInfo.charsTyped) == 0 && val != “” ) {
            ddl.selectedIndex = i;
         } // if dd1
      } // for_i
      } // if taInfo
      v_event.returnValue = false;
      return true;
  } // if v_event

  return true;
} // end of select type ahead….

5.) I’ve added the capability to clear all of your typed characters by use of the Escape Key.

// =====================================
// escape key : clear type ahead character
// =====================================
function _dw_select_typeAhead_startover() {
var v_event = window.event;
var ddl = v_event.srcElement;
ddl.options[0].selected = true;
window.status = ”;  ddl.title = ”;  
} // end of type ahead start over….

Site of the Day 5/10/2010

I fell upon this site from a link about creating music notes from JavaScript. It very cool 🙂

Site of the Day 5/7/2010

Someone sent me a link to a specific JavaScript topic for Microsoft MIX09, so here is the link for MIX09.

Future browser enhancements (JavaScript,CSS,HTML)

Here are some links concerning future browser enhancements for Firefox, IE, Google or other browsers which will help a developer.

Hack site for Firefox


new device API for Firefox 3.6: orientation

Firefox 3.7
a multi-touch drawing demo for Firefox 3.7

Microsoft IE

Good general information

Google Chrome
The Chromium Blog

General JavaScript tips/tricks

Here is a list of general JavaScript tips and tricks.


Best way to load your JavaScript
Fast by Default and Web Performances
6 ideas to improve JavaScript performance
Slow JavaScript
Multi-touch JavaScript


Thomas Frank blog
Nicholas C. Zakas blog
Steve Souders blog (Google)
DHTML Goodies


Firefox Extensions
Google Page Speed



jQuery UI


dygraphs JavaScript Visualization Library

Web Performance Tips

I’m going to start to add links concerning making my web pages faster which are not related to database issues. I will create a separate page for those tips.

Firefox Extensions
Tweak Config to make Firefox faster
Google Page Speed

Browser Scope site
12 Steps To Faster Web Pages With Visual Round Trip Analyzer
Yahoo Tips
15 Tools to Help You Develop Faster Web Pages
High Performance Web Sites blog

Some tips concerning the Web,JavaScript,CSS