diff --git a/auto.micro.js b/auto.micro.js index 6874543..6180085 100644 --- a/auto.micro.js +++ b/auto.micro.js @@ -101,14 +101,14 @@ AutoSuggestControl.prototype.init = function () { //save a reference to this object var oThis = this; //assign the onkeyup event handler - lastDate = new Date(); + var lastDate = new Date(); oThis.textbox.onkeyup = function (oEvent) { //check for the proper location of the event object if (!oEvent) { oEvent = window.event; } - newDate = new Date(); + var newDate = new Date(); if (newDate.getTime() > lastDate.getTime() + 200) { oThis.handleKeyUp(oEvent); lastDate = newDate;