This is a migrated thread and some comments may be shown as answers.

Setting the content from a pop up page

3 Answers 109 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Akhtar
Top achievements
Rank 1
Akhtar asked on 18 Jul 2012, 12:32 AM
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

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 19 Jul 2012, 04:13 PM
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.
0
Akhtar
Top achievements
Rank 1
answered on 20 Jul 2012, 05:58 PM
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
0
Marin Bratanov
Telerik team
answered on 25 Jul 2012, 02:08 PM
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.
Tags
Editor
Asked by
Akhtar
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Akhtar
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or