Re: Blur Event

  •  07-21-2011, 11:08 AM

    Re: Blur Event

    Hi JavedBoqo,
     
    please try the example below
     
    1. <?php include_once("cuteeditor_files/include_CuteEditor.php") ; ?>  
    2. <html>      
    3.     <head>  
    4.     </head>  
    5.     <body>  
    6.           
    7.         <form name="theForm" method="post" ID="Form1">  
    8.                   
    9.        <?php  
    10.             $editor=new CuteEditor();  
    11.             $editor->ID="Editor1";  
    12.             $editor->Text="Type here";  
    13.             $editor->Draw();  
    14.             $editor=null;  
    15.         ?>  
    16.         </form>  
    17.     </body>  
    18. </html>  
    19. <script>  
    20.   
    21. function CuteEditor_OnInitialized(editor)  
    22. {  
    23.     var editdoc = editor.GetDocument();  
    24.   
    25.     if(document.attachEvent)  
    26.     {  
    27.         //for ie  
    28.         editdoc.onfocusout=function()  
    29.         {  
    30.             alert("onblur");  
    31.         }  
    32.     }  
    33.     else  
    34.     {  
    35.           //for google chrome  
    36.         editdoc.body.addEventListener("blur",focusOut,false);  
    37.         //for firefox  
    38.         editdoc.addEventListener("blur",focusOut,false);  
    39.     }  
    40. }  
    41.   
    42. function focusOut()  
    43. {  
    44.     alert("onblur not ie");  
    45.  }  
    46. </script> 
    Regards,
     
    ken
View Complete Thread