Object doesnt support property or method

Last post 09-19-2007, 3:37 PM by Adam. 3 replies.
Sort Posts: Previous Next
  •  04-06-2006, 10:42 PM 17972

    Object doesnt support property or method

    var editor = document.getElementById('CE_Editor1_ID');
    alert(editor.getHTML())
     
    get a javascript error when this code runs, i have also tryed
     
    var editor = document.getElementById('<%= Editor1.ID %>');
    alert(editor.getHTML())
     
    whats happening
  •  04-07-2006, 12:25 AM 17976 in reply to 17972

    Re: Object doesnt support property or method

    You are using the .NET javascript API.
     
    For the classs asp, please use the following code instead:
     
       <%
        dim content
        content = "Type here" 
        Dim editor
        Set editor = New CuteEditor
        editor.ID = "Editor1"
        editor.Text = content
        editor.FilesPath = "CuteEditor_Files"
        editor.EditorBodyStyle = "font:normal 12px arial;"
        editor.EditorWysiwygModeCss = "asp.css"
        editor.Draw()
                
        ' Request.Form(ID) access from other page
       %>
        
       <br/><br/>
       <TEXTAREA cols=50 rows=5 id=myTextArea style="width:550px" NAME="myTextArea">Try click the "get HTML" button</TEXTAREA>
       <br/><br/>
       
       <INPUT type=button name=b4 value="get HTML" onclick="myTextArea.value=obj_Editor1.getHTML()" ID="Button1">
       <INPUT type=button name=b5 value="set HTML" onclick="obj_Editor1.editdoc.body.innerHTML=myTextArea.value;" ID="Button2">
       <INPUT type=button name=b9 value="insert HTML" onclick="obj_Editor1.PasteHTML('This is a test!')" ID="Button7">


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-19-2007, 4:35 AM 33619 in reply to 17976

    Re: Object doesnt support property or method

    When providing help, please use code which can be copied and pasted as a working example -

    having said that, where the HECK did you get obj_Editor1 ?
    You cannot just pull object out of thin air.

  •  09-19-2007, 3:37 PM 33645 in reply to 33619

    Re: Object doesnt support property or method

    If you are using version 6.0 you should use the following JavaScript API:
     
     
     
    Getting the CuteEditor Instance

    In order to find the active editor, you would type: 

    // get the cute editor instance. Editor ID is Editor1
    var editor1 = document.getElementById('CE_Editor1_ID');

    Getting the Active Editor Window

    In order to find the active editor window, you would type: 

    // get the active editor window
    var editwin = editor1.GetWindow();

    Getting the Active Editor Document


    In order to find the active editor document, you would type:

    // get the active editor document

    var editdoc = editor1.GetDocument();

     

    Getting the Active Editor Selection


    In order to find the active editor selection, you would type:

    // get the active editor selection

    var sel = editor1.GetSelection();

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML