Re: Editor 'stealing' focus on form load

  •  09-04-2012, 8:15 AM

    Re: Editor 'stealing' focus on form load

    Hi mjw001,

     

    You can set the focus for other control in the editor load API, like the example below.

     

    1. <?php include_once("cuteeditor_files/include_CuteEditor.php") ; ?>  
    2. <html>  
    3.     <head>  
    4.         <title>example</title>  
    5.     </head>  
    6.     <body>  
    7.         <form>  
    8.             <br />  
    9.             <input id="input1" />  
    10.             <?php  
    11.                 $editor=new CuteEditor();  
    12.                 $editor->ID="Editor1";  
    13.                 $editor->Draw();  
    14.                 $editor=null;  
    15.             ?>  
    16.             <script>  
    17.                 function CuteEditor_OnInitialized(editor)  
    18.                 {  
    19.                 setTimeout(setFocus,500);  
    20.                 }  
    21.                 function setFocus()  
    22.                 {  
    23.                 var input1=document.getElementById("input1");  
    24.                 input1.focus();  
    25.                 }  
    26.             </script>  
    27.   
    28.   
    29.         </form>  
    30.     </body>  
    31. </html>  
    Regards,

     

    Ken 

View Complete Thread