Javascript Error with multiple instances
Brought to you by:
kalperin
When more than one instance of the text area is defined
on the same form a java script error pops up. It occurs
on line 211
body = oRTE.getElementsByTagName("body");
and the error is: 'undefined' is null or not an object
I can't figure any cause for this and the area is otherwise
a very nice component (once you enable the code for
the underline button).
I would really like to know if anyone has a solution to
this problem multiple hypertext areas are really need on
one of my webforms.
Logged In: NO
This problem shows up on the demo.html if area2 is
uncommented.
Logged In: NO
I have tested further and this error only seems to occur on
Internet Explorer (and I would assume mosaic). I am using
Explorer 6.0. I forgot my email addy in the original note. It's
fred@mycommlog.com
Logged In: NO
i couldnt create the control there. It seems there is a bug in the FAQ.
i tried to modify the code, still couldnt get it work!
function HRControl(){
this.name = "insertHR";
this.getRenderedText = function(){
text = '<td><div id="insertHR">';
text = text + '<img class="btnImage" src="'+this.area.resourcePath+'images/post_button_hr.gif" width="20" height="20" alt="Insert HR" title="Insert HR" onClick="HyperTextArea.getArea(\''+ this.area.name +'\').insertElement(doc.createElement("hr"))">';
text = text + '</div></td>';
return text;
}
}