ExecCommand is not a function

  •  12-14-2007, 7:07 AM

    ExecCommand is not a function

    Hi,
     
    I get the following error when I try to size the editor in height with a exernal link. (I do this, because want to remeber the heigth of the editor so the user doesn't have to make it the height for it's content each time (it would be nice if on postback the .height property would reflect the actual height instead of the initial height + a feature to auto size the editor to content + 100px (where 100 would be variable).
     
    So I use:
     
    <script type="text/javascript">
    function increaseEditor()
    {
        var editor1 = document.getElementById('<%=Editor1.ClientID%>');
        editor1.ExecCommand("sizeplus");   
    }
    </script>
     
    From this:
     
    <a href=increaseEditor();">Test</a>
     
    But I get the message: editor1.ExecCommand is not a function
     
     
    I checked the variable editor, this contain the HTMLTextAreaElement so that's correct. 
     
    Please let me know,
     
    thanks, gab.
     
     

    Filed under: ,
View Complete Thread