Re: CuteEditor_OnInitialized does not get fired in Safari and Chrome Browsers

  •  12-17-2010, 8:55 PM

    Re: CuteEditor_OnInitialized does not get fired in Safari and Chrome Browsers

    Hi sanjay.joshi,
     
    Try the example below
     
    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <title>Untitled Page</title>  
    8. </head>  
    9.   
    10. <script runat="server">  
    11.   
    12.     public string loaderName;  
    13.   
    14.     protected override void OnInit(EventArgs e)  
    15.     {  
    16.         base.OnInit(e);  
    17.         System.Web.HttpBrowserCapabilities browser = Request.Browser;  
    18.         string browserName = browser.Browser;  
    19.   
    20.         switch (browserName)  
    21.         {  
    22.             case "IE":  
    23.                 loaderName = "IE_Loader";  
    24.                 break;  
    25.             case "Firefox":  
    26.                 loaderName = "Gecko_Loader";  
    27.                 break;  
    28.             case "AppleMAC-Safari":  
    29.                 loaderName = "Safari_Loader";  
    30.                 break;  
    31.             case "Opera":  
    32.                 loaderName = "Opera_Loader";  
    33.                 break;  
    34.             default:  
    35.                 break;  
    36.         }  
    37.   
    38.     }  
    39.   
    40.   
    41. </script>  
    42.   
    43. <script src="CuteSoft_Client/CuteEditor/Scripts/spell.js"></script>  
    44.   
    45. <script src="CuteSoft_Client/CuteEditor/Scripts/<%=loaderName %>/Loader.js"></script>  
    46.   
    47. <body>  
    48.     <form id="form1" runat="server">  
    49.         <asp:Wizard ID="Wizard1" runat="server">  
    50.             <WizardSteps>  
    51.                 <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">  
    52.                 </asp:WizardStep>  
    53.                 <asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">  
    54.                     <CE:Editor ID="editor1" runat="server" />  
    55.                 </asp:WizardStep>  
    56.             </WizardSteps>  
    57.         </asp:Wizard>  
    58.     </form>  
    59. </body>  
    60. </html>  
    61.   
    62. <script>  
    63. function CuteEditor_OnInitialized(editor)  
    64. {  
    65.     alert("this is a test");  
    66. }  
    67. </script> 
     
     
    Regards,
     
    Ken
View Complete Thread