Strange error after taking the focus out of the CuteEditor

  •  02-14-2008, 4:40 PM

    Strange error after taking the focus out of the CuteEditor

    Hello.
     I'm using this function to programmatically   set the focus on the cute editor.
     
    focusEditor= function (){
                        editor.FocusDocument();
                        return false;
                        }
     
    We have attached a function to the onkeydown event as follows:
     
    var editdoc=editor.GetDocument();
    editdoc.attachEvent('onkeydown',onkeyDown);
     
     Here is the function:
     function onkeyDown(e)
        {
            if (event) e = event;                
            if (e.ctrlKey && e.keyCode != 17)
            {            
                switch(e.keyCode)
                {                    
                    case keyCodes.closeKeyLower: //e --close
                        close();
                        break;
                    case 84 : // T --Email settings
                        changeEmailSettings();
                        break;
                    case keyCodes.keyTab:
                         focusToNextField();
                        break;
                    
                }
                
            }
        }
     
     
    And here is what I want to do when the user press the Crtl+Tab on the cuteeditor
     
        function focusToNextField()
        {
            document.getElementById("EmailEditor_Subject_textbox").focus();
        }
     
    Basically, I want to get the focus into one of our controls. After getting the focus, I get an strange error. This seems to be
    runned by the eval function.
     
    I get this code:
     
     
    var OxO5799=[""x0D"x0A","document","length","element "x27",""x27 not found","removeNode","parentNode","firstChild","selection","type","None","Control","text","body","",""x26amp;",""x26lt;",""x26gt;",""x26#39;",""x26quot;",""x3Cbr/"x3E",""x26nbsp;","applyElement","nodeName","INPUT","TEXTAREA","BUTTON","IMG","SELECT","TABLE","position","style","absolute","relative","|H1|H2|H3|H4|H5|H6|P|PRE|LI|TD|DIV|BLOCKQUOTE|DT|DD|TABLE|HR|IMG|","|","all","nodeType","value","textContent","childNodes","nodeValue","*","rowSpan","cellIndex","colSpan","Can"x27t Get The Position ?","Map","RowCount","ColCount","rows","cells","Unknown Error ,

    ... (tons and tons of stuff)

    Ox878=htmlcode[OxO5799[0x2]] ;<- //The error raises here
    if(Ox878>Ox66a){ alert(OxO5799[0x49b]+Ox66a+OxO5799[0x49a]) ;return false;} ;} ;return true;}  ;}  ;
     
     
    Can you help me? What's the problem?
View Complete Thread