Problem Changing the view's of editor in 6.3

Last post 04-15-2009, 1:41 AM by yuvika. 1 replies.
Sort Posts: Previous Next
  •  04-14-2009, 9:05 AM 51075

    Problem Changing the view's of editor in 6.3

    Hello,
    I am getting the error "". When I execute the code below. What I want to do in the following code is to change the view of editor from "preview" to "edit/html" view in javascript.
     
    This code was working fine with the version 6.0,But gives error in 6.3.May b the event has been changed or the way to attach event is altered.Please help me if there is any code snippet to achieve the functionality to change the view's of editor by javascript code.
    My previous working code:
    function
    ClearPurpose() {
    try {
    var eventObj = document.createEventObject();
     
    document.getElementById("TabCode").fireEvent("onclick", eventObj);
    document.getElementById("TabEdit").fireEvent("onclick", eventObj);
    event.cancelBubble = true;
    } catch (e) { }
    }
    Cute Editor Error Line:
    function anonymous()
    {
    CuteEditor_GetEditor(this).ExecImageCommand(this.getAttribute('Command'),this.getAttribute('CommandUI'),this.getAttribute('CommandArgument'),this)
    }
  •  04-15-2009, 1:41 AM 51094 in reply to 51075

    Re: Problem Changing the view's of editor in 6.3

    Hi,
     
    Thanks Everyone. Resolved  this error by updating the function to:
    function ClearPurpose() {

    var editor1 = document.getElementById('<%= UnSubscribeEditor1.ClientID %>');

    try {

    editor1.ExecCommand("TabEdit");

    } catch (e) { };

    }
     
    Thanks and Regards
    Yuvika
View as RSS news feed in XML