Hello. I was told by the postnuke forums to ask this on a general scripting forum, so I decided to give a try here since I have gotten help in the past .

I am running several large sripts, most of which have textareas that support html. I can install HTMLarea (http://www.interactivetools.com/products/htmlarea/) on them with no problem, but the thing is that some people do not like to use them, they can make the page take longer to load for dialup users, and they also can cause errors for others.

If any of you are familiar with postnuke, when you activate "Visual Mode" and then click on any text area within the site, it pops up a box that will ask you if you would like to use the WYSIWYG editor. If you say yes, the editor appears on the text area for you to use.

I would like to know how I can do this same thing using HTMLarea. I figured ill post the script that is used to put htmlarea on a page.

this goes in the <head> tags
<script language="Javascript1.2"><!-- // load htmlarea
_editor_url = "htmlareafiles/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// --></script>
and this goes under the textbox you want htmlarea to appear in.

<script language="javascript1.2" defer>
(this is a free, gpl script, so the code can be posted here).

I am assuming this shouldnt be all too dificult, probably just requires a popup box with yes and no, and some if statements, but I have no idea how to write it. Any help with this will be greatly appreciated. Thank you.