Event RichTextEditor_OnLoad not called on embedded page

Last post 04-19-2013, 9:17 AM by mwinata. 2 replies.
Sort Posts: Previous Next
  •  04-15-2013, 8:58 AM 77226

    Event RichTextEditor_OnLoad not called on embedded page

    Hi,

     

    I created a new aspx-page and load the Editor using following code:

    richtext.aspx 

    <script language="CS" runat="server">
                protected void Page_Load()
                {
                      RTE.Editor ed = new RTE.Editor();
                      ed.ID = "myEditor";
                      Page.Controls.Add(ed);
                }

    </script>

     

    with the Event RichTextEditor_OnLoad

          <script type='text/javascript'>
                function RichTextEditor_OnLoad(editor)
                {
                    editor.SetText("test123");
                    alert(editor._config.uniqueid);
                }
          </script>

     


    Then I try to embed the richtext.aspx on an existing page using this:

    $.post('otc_web/Framework/richtext.aspx', function(data) {
                        CurrentWindow.document.getElementById("richtext").innerHTML = data;
                        alert('Load was performed.');
                      });
     

    Editor is loaded correctly, but none of the Events (e.g. RichTextEditor_OnLoad) are called. But this happens only on the embedded page. Events are called upon opening richtext.aspx directly.

     

    I tried this on IE8 and IE9.

     

    Am I missing something here? Anyone has any idea why the Events are not triggered on the embedded page?

     

    Thanks in advance for any help! 

  •  04-15-2013, 11:54 AM 77228 in reply to 77226

    Re: Event RichTextEditor_OnLoad not called on embedded page

    Hi mwinata,

     

    Can you create an exmaple page which can reproduce this issue and send it to Kenneth@CuteSoft.net? So I can check it for you directly. If your example needs some special resource like jquery, please include in the example too.

     

    Regards,

     

    Ken 

  •  04-19-2013, 9:17 AM 77247 in reply to 77228

    Re: Event RichTextEditor_OnLoad not called on embedded page

    Hi Ken,

     

    thanks for the reply. Its no longer an issue. The problem was, that the "OnLoad"-Scripts were not in the embedded page. It works after some tweaks.

     

    Best regards,

     

    Max 

View as RSS news feed in XML