Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center
in Search

Dynamically Disable CuteEditor or Set to Readonly via Javascript?

Last post 03-29-2010, 12:47 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  03-29-2010, 11:38 AM 59715

    Dynamically Disable CuteEditor or Set to Readonly via Javascript?

    Is there a good way or a workaround for setting the CuteEditor to disabled dynamically via Javascript?
    The application has a CuteEditor textbox and a checkbox that says 'Not Applicable'.
    If the user clicks the checkbox they want the editor to be disabled.
    The client does not want us to do it server side via an AutoPostback of the checkbox.
    The version of CuteEditor we are using for this app is
    I have seen one or two threads that say it can't be done but the last post was a few years back and I'm wondering if that was an older version of the control, or if people have come up with other reasonable workarounds, e.g. wrapping the control in a div or table and somehow disabling the wrapper control, or hiding it and showing a readonly version of text.
    Below is the starting point for my javascript function.  It gets a handle to the cuteEditor but setting the disabled property does not disable the control.
    function NotApplicableChanged(checkboxId, rootId) {
      var checkbox = document.getElementById(checkboxId);
      var cuteEditor = document.getElementById('CE_ce' + rootId + '_ID');
      if (cuteEditor != undefined) { cuteEditor.disabled = checkbox.checked; }
  •  03-29-2010, 12:47 PM 59717 in reply to 59715

    Re: Dynamically Disable CuteEditor or Set to Readonly via Javascript?

     The ReadOnly property can not be set in the client side.  This is by design. If you do need  dynamically disable CuteEditor, I suggest you use Ajax and set ReadOnly in the server side. Chat
    Web Messenger: wysiwyg editor:
    asp wysiwyg html editor: Image Gallery:
    Live Support:

View as RSS news feed in XML
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.