Hi,
I'm facing the following challenge. I am controlling a website on domain aaa (www.aaa.com) and one of the pages needs to use data which is retrieved from domain bbb (www.bbb.com).
In pseudo code I would like my html page on www.aaa.com to do the following:
while (forever) {
my VarData = ReadURL("http://www.bbb.com");
[Do something with VarData]
sleep 5; // (and then try again...)
}
From various posts on this forum I seem to have concluded that using an hidden iframe is the best thing to do but I can't get it to work because, IE-7 gives me "access denied" errors every time I go to www.bbb.com using this code:
var frame1=document .getElementById ('iFrameBBB');
var iframeDocument = frame1.contentW indow ? frame1.contentW indow.document
: frame1.contentD ocument;
var root = iframeDocument. documentElement || iframeDocument. body;
var HTML = root.innerHTML;
and iFrameBBB is declared as:
<iframe height="600" width="600" src="http://www.bbb.com" id='iFrameBBB' name='myiframe' >
Can anyone suggest a simple method achieving the above? The data on www.bbb.com is a simple line of text.... Thanks in advance for your help
Leon
I'm facing the following challenge. I am controlling a website on domain aaa (www.aaa.com) and one of the pages needs to use data which is retrieved from domain bbb (www.bbb.com).
In pseudo code I would like my html page on www.aaa.com to do the following:
while (forever) {
my VarData = ReadURL("http://www.bbb.com");
[Do something with VarData]
sleep 5; // (and then try again...)
}
From various posts on this forum I seem to have concluded that using an hidden iframe is the best thing to do but I can't get it to work because, IE-7 gives me "access denied" errors every time I go to www.bbb.com using this code:
var frame1=document .getElementById ('iFrameBBB');
var iframeDocument = frame1.contentW indow ? frame1.contentW indow.document
: frame1.contentD ocument;
var root = iframeDocument. documentElement || iframeDocument. body;
var HTML = root.innerHTML;
and iFrameBBB is declared as:
<iframe height="600" width="600" src="http://www.bbb.com" id='iFrameBBB' name='myiframe' >
Can anyone suggest a simple method achieving the above? The data on www.bbb.com is a simple line of text.... Thanks in advance for your help
Leon
Comment