Problems with Javascript API

  •  02-19-2007, 10:55 AM

    Problems with Javascript API

    Hi,
     
    I have a very simple little function that is attempting to add some HTML to my editor, but it keeps failing with the typical javascript error ("Object doesn't support this property or method.").
     
    I have looked through this forum, but all the posts regarding Jscript are several years old and I'm not sure if they still apply. The error is occurring on the second line where I do the getHTML() method. In addition, the setHTML() method doesn't work either.
     
    function addItemInfo()
    {
    var editor = document.getElementById('ceEditor');
    var editorContent = editor.getHTML();
    var content = document.all.ddlItemInfo.options[document.all.ddlItemInfo.selectedIndex].value;
    editor.setHTML(content + editorContent);
    }
     
    Please advise.
    Thanks.
    Jason
View Complete Thread