You are not logged in.
Howdy
I am trying to get a child window to write back into the Xinha textarea. I am using this to automatically insert URLs and images after files and images are uploaded. It works great in the rest of my application (i.e. when a Pdf is uploaded to my content management system it automatically fills in the "Identifier" field with the url of the uploaded document). Here is functional code:
<SCRIPT LANGUAGE="JavaScript">window.opener.document.Identifier.value="http://clac.server.admin.state.mn.us/images/Cover.gif" </script>
However I am not sure how to address the Xinha text area. I have tried a few things which fail (in the attempt #1, below, "Content" is the form field which Xinha is acting on):
<SCRIPT LANGUAGE="JavaScript">window.opener.document.Content.value=http://clac.server.admin.state.mn.us/images/Cover.gif" </script>
<SCRIPT LANGUAGE="JavaScript">window.opener.document.xinha_editors.value=http://clac.server.admin.state.mn.us/images/Cover.gif" </script>
If I turn off Xinha, attempt #1 works. Any suggestions?
Andrew Koebrick
State of Minnesota, Department of Administration
Offline
currently you write into the textarea - which is not the contents of the xinha i-frame.
use editor.setHTML() and editor.getHTML() instead
probably this would work:
window.opener.document.xinha_editors['youreditor'].setHTML('blah');
Niko
Offline
i've used HTMLArea.xinha_editors['text_area'].setHTML('blah'); AND document.xinha_editors['text_area'].setHTML('blah');
but no one works
Offline