Явно си доста далече от програмирането

Без да се обиждаш

GeSHi (Javascript):
Function.prototype.defer = function(scope, timeout, args)
{
var self = this;
var fn = function () {self.apply(scope || window, args || [])};
return setTimeout(fn, timeout);
}
function InputProcessor(input, onChange)
{
this.input = input;
this.onChange = onChange;
this.monitorPoll = 200;
this.value = input.val();
this.monitorValueChange = function()
{
if (this.value.length !== input.val().length || this.value !== input.val())
{
this.value = input.val();
this.onChange(this.value);
}
this.monitorValueChange.defer(this, this.monitorPoll);
}
}
var onValueChanged = function (value)
{
$.post
(
'translate_lang.php?lang={LANG}' ,
{
results : $("#results").val()
},
function(response)
{
$("#userResult").html(response);
}
);
}
var inputProcessor = new InputProcessor($("#results"), onValueChanged);
inputProcessor.monitorValueChange();
PS: Не съм го пробвал