Hello,

I'm trying to use the ierange.js on a popup window to get the selected range of the parent window.

The Mozilla branch works just fine and I have trouble with the IE branch.

First, I donÁt know which isrange I should use as there seems to be two versions of the same software. One version is at GitHub at http://github.com/timcameronryan/IERange and the other one is at Google Code at http://code.google.com/p/ierange/

Second, I don't know how to retrieve the user selection of the PARENT window content editor.

I can see the ierange.js file is included all right when using IE.

<!--[if IE]>
<script language="javascript" type="text/javascript" src="$gJsUrl/ierange.js"></script>
<![endif]-->

or

<!--[if IE]>
<script language="javascript" type="text/javascript" src="$gJsUrl/ierange-m2.js"></script>
<![endif]-->

The trouble I have is to make use of the ierange methods so as to retrieve the user selection of the PARENT window editor content.

The trouble I have is to make use of the ierange methods so as to retrieve the user selection of the PARENT window editor content.

function getUserSelection() {
var oName = window.opener.oUtil.oName;
if (navigator.appName.indexOf('Microsoft') != -1) {
var oEditor = window.opener.document.getElementById("idContent"+oName);
var oContentArea = oEditor.contentWindow;
alert("oContentArea " + oContentArea); // Is displayed fine with a retrieved object
var oSel = oContentArea.getSelection();
alert("oSel " + oSel); // Is not displayed
} else {
var oEditor = window.opener.document.getElementById("idContent"+oName);
var oContentArea = oEditor.contentWindow;
var oSel = oContentArea.getSelection();
}
return(oSel);
}

Would you have any idea on this ?

Thanks for any tip !

Cheers,

Stephane