R
Robert
Hi:
I intend to use an HTA (HTML application) in order to circumvent the
security model of Internet Explorer that prevents cross-domain
scripting.
The document I have normally no access to (i.e. www.yahoo.com) is
displayed in a frame. I can change its content, but for some reason
I cannot retrieve the selection the user makes with the mouse. In
other words:
function changeInput()
{
inputs = myFrame.document.getElementsByTagName('input');
for (i = 0; i < inputs.length; i++)
{
inputs.outerHTML = 'hello';
}
}
.... works, regardless of the url of myFrame, but...
function getText()
{
alert('we have a selection of type ' +
myFrame.document.selection.type);
alert (myFrame.document.selection.createRange().text);
}
.... only works if myFrame points to a document in my domain (an
"access is denied" error is raised when I try to access the
"selection" property - i.e. it behaves like a regular HTML page, not
like an HTA).
Any idea?
Thanks,
Robert
I intend to use an HTA (HTML application) in order to circumvent the
security model of Internet Explorer that prevents cross-domain
scripting.
The document I have normally no access to (i.e. www.yahoo.com) is
displayed in a frame. I can change its content, but for some reason
I cannot retrieve the selection the user makes with the mouse. In
other words:
function changeInput()
{
inputs = myFrame.document.getElementsByTagName('input');
for (i = 0; i < inputs.length; i++)
{
inputs.outerHTML = 'hello';
}
}
.... works, regardless of the url of myFrame, but...
function getText()
{
alert('we have a selection of type ' +
myFrame.document.selection.type);
alert (myFrame.document.selection.createRange().text);
}
.... only works if myFrame points to a document in my domain (an
"access is denied" error is raised when I try to access the
"selection" property - i.e. it behaves like a regular HTML page, not
like an HTA).
Any idea?
Thanks,
Robert