Re: AutoPostBack on Enter Key ?

  •  05-12-2005, 11:53 AM

    Re: AutoPostBack on Enter Key ?

    Hello:
     
    Plage try this script:
     
     
    <script runat="server">
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        Editor1.Attributes["oninitialized"] = "Client_Handle_Editor_Initialized(this)";
    }
    </script>
    <script>
    function Client_Handle_Editor_Initialized(editor)
    {
     editor.GetDocument().onkeydown=function()
     {
      var event=editor.GetDocument().parentWindow.event;
      if(event.keyCode==13)//ENTER
      {
          editor.ExecCommand("PostBack",false,"Save");
         
          event.cancelBubble=true;
          event.returnValue=false;
      }
     }
    }
    </script>
     
     
    Regards , Terry .
View Complete Thread