onKeypress and change keyCode

Last post 06-16-2006, 7:00 AM by norton. 2 replies.
Sort Posts: Previous Next
  •  06-15-2006, 5:13 AM 20177

    onKeypress and change keyCode

    Hello
    i have two question about this editor:
     
    1- how can attach keypress event with monitor key that pressed and change keycode (client side or server side)
     
     
    for example:
     
     
    function attach{
     
    var editor1 = document.getElementById('<%Editor1.ClientID%>');
    editdoc=editor1.GetDocument();
     
    if(editdoc.attachEvent){
       editdoc.attachEvent('onkeypress',Keypress);
    }else if(editdoc.addEventListener){
       editdoc.addEventListener('keypress',Keypress,true);
    }
     
    }
     
     
    function Keypress{
       alert(window.event.keyCode)
       if (window.event.keyCode==1200){
          window.event.keyCode=1201
       }
    }
     
     
     
    2- can set align or text direction on server side? (i can set it on clitent side but ...)
     
     
    thanks
    - Norton
     
  •  06-15-2006, 4:11 PM 20200 in reply to 20177

    Re: onKeypress and change keyCode

    norton,
     
    For the "attach keypress event" issue, can you tell me what your question is?
     
    >>2- can set align or text direction on server side? (i can set it on clitent side but ...)
     
    No.
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-16-2006, 7:00 AM 20212 in reply to 20177

    Re: onKeypress and change keyCode

    Hello

    i wrote new script and my problem now resolved.

    editdoc.attachEvent("onkeypress", function Func1(event){Func2(event)} );
     
    function Func2(e) {
    alert(e.keyCode)
    }
     
    thank you.
     
    - Norton
     
View as RSS news feed in XML