setHTML is not working in IE6

Last post 05-13-2011, 11:32 AM by Eric. 1 replies.
Sort Posts: Previous Next
  •  05-13-2011, 2:39 AM 67559

    setHTML is not working in IE6

    we are using ASP Cute Editor control. When we are calling cuteEditor.SetHTML() method to set the HTMLtext, it is throwing error in IE6.
    Browser closes abruptly after this method call. Code is working properly in IE8.
     
    When I keep the alert() messages in the code after setHTML statement, it is working properly in IE6.
     
    Below is code snippet.
     
    var editor1 = document.getElementById('CE_scr_resp_new'+intIndex+'_ID');
    // Set the editor editor1.setHTML(strResponse);
    editor1.SetActiveTab("View");
    editor1.ShowBottomBar = "False";
     
    Could anyone Please help me on this.
     
    Thanks in advance
  •  05-13-2011, 11:32 AM 67567 in reply to 67559

    Re: setHTML is not working in IE6

    Dear sridharRepala,
     
    I tested the following snippet in ie6.0, it works fine:
     
    <!-- #include file = "cuteeditor_files/include_CuteEditor.asp" -->
    <html> 
        <head> 
     </head>
     <body>
      <table cellspacing="0" cellpadding="3" width="800" border="0" class="tbmain">
       <tr>   
        <td valign="top">      
         <% 
           Dim editor
           Set editor = New CuteEditor       
           editor.ID = "Editor1"       
           editor.Width = "760"
           editor.Height = "250"       
           editor.Draw()       
           ' Request.Form(ID) access from other page
         %>      
         <br/><br/>
       <input type="button" value="set HTML" onclick="setHTML()" ID="Button2" />
       <script type="text/javascript" >   
       function setHTML()
       {
        // get the cute editor instance
        var editor1 = document.getElementById('<%=editor.ClientID%>');    
        // Set the editor
        editor1.setHTML("this is a test");
       }
       
      var editor1=document.getElementById("<%=editor.ClientID%>");
      if(editor1.IsReady)CuteEditor_OnInitialized(editor); 
        
      </script>
        </td>    
       </tr>
      </table>
      </form>
     </body>
    </html>
     
    Thank you for asking
View as RSS news feed in XML