I have an IFRAME on my page and am trying to info from it.
I get and "Acces Denied error when i call the following
function:
the first function works with no problem but the second one
that references the IFRAME is driving me crazy.
// ***********************************************
// THIS FUNCTION WORKS FINE for Main document
// ***********************************************
function printRange() {
var range = document.body.createTextRange();
if (range!=null) {
document.txtHtml.PagetxtHTML.value=""
document.txtHtml.PagetxtHTML.value=range.htmlText;
}
}
// ***********************************************
// THIS FUNCTION FAILS for the IFRAME
// ***********************************************
function printIFrameRange() {
var range = document.frames["weatherPage"].document.body.createTextRange();
if (range!=null) {
document.txtHtml.bulktext.value=""
document.txtHtml.bulktext.value=range;
}
}
// ***********************************************
I cant read anything from the IFRAME even its location
document.frames["weatherPage"].document.location.href
What am I doing wrong in referring to the IFRAME?
Tkx - Jim
I get and "Acces Denied error when i call the following
function:
the first function works with no problem but the second one
that references the IFRAME is driving me crazy.
// ***********************************************
// THIS FUNCTION WORKS FINE for Main document
// ***********************************************
function printRange() {
var range = document.body.createTextRange();
if (range!=null) {
document.txtHtml.PagetxtHTML.value=""
document.txtHtml.PagetxtHTML.value=range.htmlText;
}
}
// ***********************************************
// THIS FUNCTION FAILS for the IFRAME
// ***********************************************
function printIFrameRange() {
var range = document.frames["weatherPage"].document.body.createTextRange();
if (range!=null) {
document.txtHtml.bulktext.value=""
document.txtHtml.bulktext.value=range;
}
}
// ***********************************************
I cant read anything from the IFRAME even its location
document.frames["weatherPage"].document.location.href
What am I doing wrong in referring to the IFRAME?
Tkx - Jim