i am working on a plugin which would open a page containing a dropdownlist box, when the user selects a value from the list, a file is opened and file contents are sent to a hidden textarea on the page. i also hve a button which when clicked, i want the child window to be closed and textarea contents to be transfered to the editor control on the parent page.
i have opened the window using window.open in the plugin file
following is the code in the javascript funtion
var a = document.getElementById('<%=TextBox1.ClientID%>')
var rfile = a.innerText
var oEditor = window.opener.InnerDialogLoaded()
oEditor.FCK.InsertHtml( rfile || "" ) ;
window.close();
when i click the button i get the value in rfile but i cant get the rfile value to be set in the fckeditor on the parent page.
i am using asp.net and vb.net.
i would be greatful if somebody could help me out here.
thanks
san
i have opened the window using window.open in the plugin file
following is the code in the javascript funtion
var a = document.getElementById('<%=TextBox1.ClientID%>')
var rfile = a.innerText
var oEditor = window.opener.InnerDialogLoaded()
oEditor.FCK.InsertHtml( rfile || "" ) ;
window.close();
when i click the button i get the value in rfile but i cant get the rfile value to be set in the fckeditor on the parent page.
i am using asp.net and vb.net.
i would be greatful if somebody could help me out here.
thanks
san
RE: about plugin
InnerDialogLoaded is a helper function that it's used when the dialogs are loaded inside the "dialog holder" and it allows the inner frame to get the editor like this:
var oEditor = window.parent.InnerDialogLoaded();
If you're opening your window without using the dialog system you'll need to get the reference to the editor in another way (if the name of the editor is constant then you could use the API)