CuteEditor_OnInitialized does not get fired in Safari and Chrome Browsers

Last post 12-24-2010, 7:18 AM by sanjay.joshi. 6 replies.
Sort Posts: Previous Next
  •  12-17-2010, 12:25 AM 65396

    CuteEditor_OnInitialized does not get fired in Safari and Chrome Browsers

    Hi,
    I am  seeing a weird problem with CuteEditor_OnInitialized that it does not get fired for Safari and Chrome browsers. However it works fine for FF and IE.
    But, if i enclose the functionality of CuteEditor_OnInitialized within window.onload() method, it seems to be working fine for all the browsers.
     
    Does anybody know why CuteEditor_OnInitialized does not work in safari or Chrome , but in FF and IE?
    ALso, the workaround , I have done by enclosing the functionality of CuteEditor_OnInitialized in window.onload() , is  fine or there can be some other alternative so that CuteEditor_OnInitialized get fired for Safari and Chrome also?
     
    Thanks in Advance
    -Gaurav
  •  12-17-2010, 12:57 AM 65397 in reply to 65396

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

    Hi sanjay.joshi,
     
    It works fine for me. Can you try the example below? Does it works on your safari and chrome?
     
    What version of safari and google chrome you are testing?
     
    If it only happen on special case, please show me the code. I will check it and get back to you as soon as possible.
     
    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. <body>  
    10.     <form id="form1" runat="server">  
    11.         <CE:editor id="editor1" runat="server" />  
    12.     </form>  
    13. </body>  
    14. </html>  
    15.   
    16. <script type="text/javascript">  
    17. function CuteEditor_OnInitialized(editor)  
    18. {  
    19.     alert("this is a test");  
    20. }  
    21. </script> 
     Regards,
     
    ken
  •  12-17-2010, 1:13 AM 65399 in reply to 65397

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

    Hi,
     I am using google Chrome  
    8.0.552.224
     
    and Safari  5.0.3(7533.19.4) and this is still creating a problem for me.
     
    There are two cases i am seeing.
    1) when the cuteEditor is always oresent on the page then it does not create any problem.
    2) when  CuteEditor is there in a  placeHolder and its visibility is set to true at any step of a wizard , then
    CuteEditor_OnInitialized
     does not get fired for Safari and Chrome, however it works for FF and IE.
     
    please let me know if you need some other information.
     
    Thanks,
  •  12-17-2010, 1:25 AM 65400 in reply to 65399

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

    Hi sanjay.joshi,
     
    Please add the code below into your page and try again
     
    ------------------------------------------------------------------------------------------------------
     
    <script runat="server">

        public string loaderName;

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            System.Web.HttpBrowserCapabilities browser = Request.Browser;
            string browserName = browser.Browser;

            switch (browserName)
            {
                case "IE":
                    loaderName = "IE_Loader";
                    break;
                case "Firefox":
                    loaderName = "Gecko_Loader";
                    break;
                case "AppleMAC-Safari":
                    loaderName = "Safari_Loader";
                    break;
                case "Opera":
                    loaderName = "Opera_Loader";
                    break;
                default:
                    break;
            }

        }

    </script>

    <script src="CuteSoft_Client/CuteEditor/Scripts/spell.js"></script>

    <script src="CuteSoft_Client/CuteEditor/Scripts/<%=loaderName %>/Loader.js"></script>
     
    ------------------------------------------------------------------------------------------------------
     
    If you still get this issue, please send me the test page, I will check it and get back to you as soon as possible.
     
    Regards,
     
    Ken
  •  12-17-2010, 2:39 AM 65406 in reply to 65400

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

    Hi Ken,
    It seems to be that when i work in a wizard, then initially the Placeholder containing the CuteEDITOR in invisible and when it gets visible, then
    CuteEditor_OnInitialized does not get fired.
     
     I am having a Parent wizard page which  is having  a placeholder at step 3 containing the CuteEditor. so, as soon as i click Next from step 2 to see the HTML editor, then CuteEditor_OnInitialized is not fired.
     As i get it it seems to be related with visibility of the CuteEditor somehow on the page.
     
    Thanks
    -Gaurav
     
  •  12-17-2010, 8:55 PM 65432 in reply to 65406

    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
  •  12-24-2010, 7:18 AM 65520 in reply to 65432

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

    I tried it also, But it also does not seem to work. It did not prove to be much helpful.
View as RSS news feed in XML