onKeypress and change keyCode

  •  06-15-2006, 5:13 AM

    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
     
View Complete Thread