troubleshooting Question

Write a value to a form.field that's a HTMLArea field

Avatar of globalwm
globalwm asked on
Web Languages and StandardsJavaScript
12 Comments1 Solution1602 ViewsLast Modified:
I have the following JavaScript that runs fine when pointed to a "regular" form field:

function popAssign(UID)
     var UID
       fqryOpenIssuesedit.x_RegularFormField.value = 'Self assigned to: ' + UID

Which is called by:
<img src="images/AssignAgentS.gif" onClick="popAssign('<%=UserID %>');" alt="Assign to Me" width="32" height="32">

Again, this works fine.

However, when I point to a form field that is handled by HTMLArea (x_Completed_Remarks), nothing happens.

<textarea cols="35" rows="4" id="x_Completed_Remarks" name="x_Completed_Remarks"><%= x_Completed_Remarks %></textarea>
<script type="text/javascript">
var editor = new EW_DHTMLEditor("x_Completed_Remarks");
editor.create = function() {
      var config = new HTMLArea.Config();
      config.toolbar = _editor_toolbar;
      config.width = 35*_width_multiplier + 'px';
      config.height = 4*_height_multiplier + 'px';
      config.sizeIncludesToolbar = false;
      var ta = HTMLArea.getElementById("textarea", "x_Completed_Remarks");
      var ha = ta ? (new HTMLArea(ta, config)) : null;
      if (ha) {
            this.editor = ha;
   = true;
EW_DHTMLEditors[EW_DHTMLEditors.length] = editor;

Must I state something differently?

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros