ok..heres the short stuff, when the button is clicked, it will call a function in editor.
js, supply it with the name of the textarea created with panels.innerHTML = "<textarea name='panel' cols='50' rows='5' id='panel'></textarea>", and the function will create the html editor.
if i submit the form now, no problem
if i close the textarea, i.e. panels.innerHTML = "", the error, document.all[...].config is null or not an object will appear
the exact function called when button is clicked
function createForm() {
if (panelflag == false) {
data = "<textarea name='panel' cols='50' rows='5' id='panel'></textarea>"
document.form1.btn.value = "Remove Panels";
panelflag = true;
}
else {
data = "";
document.form1.btn.value = "Add Panels";
panelflag = false;
}
if (document.layers) {
document.layers.panels.document.write(data);
document.layers.panels.document.close();
}
else {
if (document.all) {
panels.innerHTML = data;
}
}
if (panelflag == true) {editor_generate('panel');} 'from editor.
js
}
the relevant function in editor.
js where the error occured
function editor_generate(objname,userConfig) {
// Default Settings
var config = new editor_defaultConfig(objname);
if (userConfig) {
for (var thisName in userConfig) {
if (userConfig[thisName]) { config[thisName] = userConfig[thisName]; }
}
}
document.all[objname].config = config; 'i believe this is where error occured // store config settings
blah blah blah...lots more codes
hope this makes its easier to find out whats wrong
1 more thing, if i actually 'close' my textarea 3 times, the error will appear 3 times, close the textarea 2 times, and the error will pop up 2 times.....