View Full Version : HTMLArea with mulitple textareas

09-26-2004, 02:42 PM
HTML area 3 works great with IE and Firefox. The problem I am running into is that if you have 2 or more different textarea's, then it quits working in IE but will still work in Firefox. I have put the code into main.php where it says textarea. I have the script saying:

<style type="text/css">
.textarea { height: 30em; width: 80%; }
<script type="text/javascript">
_editor_url = "htmlarea/";
_editor_lang = "en";
</script><!-- load the main HTMLArea file -->
<script type="text/javascript" src="htmlarea/htmlarea.js">
<script type="text/javascript">
initdocument = function () {
var editor = new HTMLArea("<?php echo "$field_name"; ?>");
function addEvent(obj, evType, fn)
if (obj.addEventListener) { obj.addEventListener(evType, fn, true); return true; }
else if (obj.attachEvent) { var r = obj.attachEvent("on"+evType, fn); return r; }
else { return false; }
addEvent(window, 'load', initdocument);
<FONT face=Arial size=2><FONT face=Arial size=2>
echo "<textarea id=\"$field_name\" class=\"textarea\" name=\"$field_name\" style=\"width:350; height:150\" rows=\"1\" cols=\"20\">

Any ideas on how to make this work in IE twice?