Custom Button pasteing Javascript

  •  11-04-2008, 3:40 PM

    Custom Button pasteing Javascript


     
    My question is how do create a custome button to paste javascript?
    I am trying to paste the javascript code in the body.
     

    WebControl ctrl = Editor1.CreateCommandButton("MyButton", "MyButton.png", "Insert MyButton");

    ctrl.Attributes["onclick"] = "CuteEditor_GetEditor(this).ExecCommand('PasteHTML',false,' <script>document.write('Hello World!');</script>')";

View Complete Thread