Setting the content from a pop up page

4 posts, 0 answers
  1. Akhtar
    Akhtar avatar
    2 posts
    Member since:
    Jul 2012

    Posted 17 Jul 2012 Link to this post

    Hi,
    I have a page which has multiple tabs ( .ascx) controls, each tab has a RadEditor. I open a popup window from each tab and trying to set the Content of the parent window RadEditor Control.

    By doing
    var editor = opener.document.getElementById('ctl00_ContentPlaceHolder1_Ctrl_Operation_RadEditorOP_SmartOperationalGoal'); I can get the control and can set the innerHTML but that's about it. I need to set the content of and and when ever I use

    editor.set_html('test'); I get this object is supported error.

    Need help in setting the value from a popup to the parent window control content.
    Thanks,
    Roomi
  2. Rumen
    Admin
    Rumen avatar
    14437 posts

    Posted 19 Jul 2012 Link to this post

    Hello,

    You can use the solution provided in the following live demo: Editor In RadWindow.

    Best regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Akhtar
    Akhtar avatar
    2 posts
    Member since:
    Jul 2012

    Posted 20 Jul 2012 Link to this post

    Rumen,
    I tried but no luck. Funny thing is I can set the innerHTML of the control but cannot user set_html() property, it always throw javascript error.

    Again My ASPX page has couple of tabs loading controls and each tab popup a window with datagrid and I need to select some data and pass it back to parent window.
    <script language=JavaScript>
    var editor = opener.document.$find('RadEditorOP_SmartOperationalGoal');opener.document.editor.set_html('Test the Value'); window.close();</script>
    I get error on this line.

    Thanks
    Roomi
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5811 posts

    Posted 25 Jul 2012 Link to this post

    Hi Roomi,

    You need to get a proper reference to the RadEditor control, which means that you need its full ClientID in the main page.This is explained in the following help article: http://www.telerik.com/help/aspnet-ajax/editor-getting-reference-to-radeditor.html. You can create a JavaScript function in the main page that will return the needed reference and call it from the popup page.


    Greetings,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top