Image

offsetWidth в HtmlArea

Установлен HtmlArea v3.0 . Работает нормально, но при загрузке javascript выдает ошибку:
"OffsetWidth" - есть null или не является объектом.

Ошибку выдает в 632 строке htmlarea.js

HTMLArea.prototype.generate = function () {
	var editor = this;	// we'll need "this" in some nested functions
	// get the textarea
	var textarea = this._textArea;
	if (typeof textarea == "string") {
		// it's not element but ID
		this._textArea = textarea = HTMLArea.getElementById("textarea", textarea);
	}
	this._ta_size = {
 	                w: textarea.offsetWidth,    // 632 строка
		h: textarea.offsetHeight
	};
	textarea.style.display = "none";
....


Дело в том, что строка
this._textArea = textarea = HTMLArea.getElementById("textarea", textarea);

возвращает null. Не разберу почему. Может кто подскажет?
Заранее спасибо.

UPD. Пофиксил