How to assign the value of a div to a cute editor on client side?

  •  10-24-2008, 4:49 AM

    How to assign the value of a div to a cute editor on client side?

    Hello,
    I'm assigning a pragraph's innerHTML to my cute Editor on client side but its not accepting the data from pragraph. My whole page is as below:
     
                       
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Welcome to Quattro Html Editor</title>
        <script language="javascript" type="text/javascript">
                                function GetData(dvData)
                                {
                                    alert(document.getElementById(dvData).innerHTML);
                                    //document.getElementById('qtroEditor1').setHTML(document.getElementById(dvData).innerHTML);
                                    document.getElementById('<%=      qtroEditor1.ClientID%>').value=document.getElementById(dvData).innerHTML;
                                }
                            </script>
    </head>
    <body>
        <form id="frmOct20" runat="server">
        <CE:EDITOR id="qtroEditor1" runat="server" Height="150" Width="300" ShowBottomBar="false" ThemeType="Office2007" AutoConfigure="Minimal" EnableContextMenu="True" ></CE:EDITOR>
                            <input type="button" value="Edit 1" id="btnEdit" onclick="GetData('divData1')"/>
                            <input type="button" value="Edit 2" id="Button1" onclick="GetData('divData2')"/>
                            <input type="button" value="Edit 3" id="Button2" onclick="GetData('divData3')"/>
                           
                            <div id="divData1">
                                Block 1 <b>Data</b>
                            </div>
                            <div id="divData2">
                                Block 2 <b>Data</b>
                            </div>
                            <div id="divData3">
                                Block 3 <b>Data</b>
                            </div>
        </form>

    </body>
    </html>

View Complete Thread