--- htmlarea.js.org 2008-06-11 10:15:20.000000000 +0200
+++ htmlarea.js 2008-06-16 16:37:24.000000000 +0200
@@ -2655,16 +2655,26 @@
HTMLArea.onGenerateHandler = function(editorNumber) {
return (function() {
- document.getElementById('pleasewait' + editorNumber).style.display = 'none';
- document.getElementById('editorWrap' + editorNumber).style.visibility = 'visible';
+ var myPleaseWait = document.getElementById('pleasewait' + editorNumber);
+ if (myPleaseWait) myPleaseWait.style.display = 'none';
+
+ var myEditorWrap = document.getElementById('editorWrap' + editorNumber);
+ if (myEditorWrap) myEditorWrap.style.visibility = 'visible';
+
editorNumber = null;
});
};
HTMLArea.initEditor = function(editorNumber) {
+ var myPleaseWait = document.getElementById('pleasewait' + editorNumber);
+ var myEditorWrap = document.getElementById('editorWrap' + editorNumber);
+
+ if (!myPleaseWait || !myEditorWrap) return false;
+
if(HTMLArea.checkSupportedBrowser()) {
- document.getElementById('pleasewait' + editorNumber).style.display = 'block';
- document.getElementById('editorWrap' + editorNumber).style.visibility = 'hidden';
+ myPleaseWait.style.display = 'block';
+ myEditorWrap.style.visibility = 'hidden';
+
if(HTMLArea.initTimer[editorNumber]) window.clearTimeout(HTMLArea.initTimer[editorNumber]);
if(!HTMLArea.is_loaded) {
HTMLArea.initTimer[editorNumber] = window.setTimeout( "HTMLArea.initEditor(" + editorNumber + ");", 150);
@@ -2705,8 +2715,8 @@
return false;
}
} else {
- document.getElementById('pleasewait' + editorNumber).style.display = 'none';
- document.getElementById('editorWrap' + editorNumber).style.visibility = 'visible';
+ myPleaseWait.style.display = 'none';
+ myEditorWrap.style.visibility = 'visible';
}
};