PAID Customer question: InsertText question

  •  10-21-2004, 12:56 PM

    PAID Customer question: InsertText question

    I'm able to insert text into my editor using the following javascript:

     
     function InsertText(text) { EditorID = "bodyID_editBox"; var editor = document.getElementById(EditorID); editor.focus(); var sel = editor.document.selection.createRange(); if (editor.document.selection.type == 'Control') { return; } sel.pasteHTML(text); }
     
    This works fine if I'm using IE.  However, if I use Mozilla or a browser other than IE, this fails.   The exact error is: "Editor has no properties."
     
    What code should I use to insert for non IE browsers?
View Complete Thread