M
Manfred
Hi,
When I click any link on this page
http://free.pages.at/staudinger/Regest/Regesten/_A1601-02-08-01657.xml
it only works with IE 6 (and Firefox) but not in IE 7.
I've difficulties to pinpoint the problem (I'm still on win2000 and can
test only occasionally with IE 7) but I suspect it is in the very last
part (copyContent, shown below) of the script (full version at
http://free.pages.at/staudinger/Regest/htmlhttprequest_test.js )
In case of IE I use innerHTML to copy content from a hidden iframe
into a div. Could this be a problem in IE 7 ?
Thank you,
Manfred
//last part of the script:
RemoteFileLoader.prototype.copyContent=function(domDoc,destId){
var src;
divs=domDoc.getElementsByTagName('div');
for (var i=0; i<divs.length; i++) {
if(divs.getAttribute('id')=='xmlbody'){
src=divs;
break;
}
}
alert('copyContent'+'\nsrc '+src+'\ndestId '+destId);
if(src==null){src=domDoc.getElementsByTagNameNS?domDoc.getElementsByTagNameNS(nsXhtml,'body')[0]domDoc.getElementsByTagName?domDoc.getElementsByTagName('body')[0]domDoc.body?domDoc.body:null))}
var
dest=document.getElementById?document.getElementById(destId)document.all?document.all[destId]:null);
if(!src||!dest)return;
alert('copyContent'+'\nsrc '+src+'\ndest '+dest);
if(document.implementation.hasFeature("Range","2.0")){
// this is the code for firefox
var range = src.ownerDocument.createRange();
range.selectNodeContents(src);
frag = range.cloneContents();
dest.appendChild(frag);
alert('copyContent'+'\nRange '+'\ndest.innerHTML '+dest.innerHTML);
}
else{
alert('copyContent'+'\ninnerHTML ');
if(src.innerHTML){
// this works fine in IE 6
dest.innerHTML=src.innerHTML;
alert('copyContent'+'\ndest.innerHTML '+dest.innerHTML);
}
}
};
When I click any link on this page
http://free.pages.at/staudinger/Regest/Regesten/_A1601-02-08-01657.xml
it only works with IE 6 (and Firefox) but not in IE 7.
I've difficulties to pinpoint the problem (I'm still on win2000 and can
test only occasionally with IE 7) but I suspect it is in the very last
part (copyContent, shown below) of the script (full version at
http://free.pages.at/staudinger/Regest/htmlhttprequest_test.js )
In case of IE I use innerHTML to copy content from a hidden iframe
into a div. Could this be a problem in IE 7 ?
Thank you,
Manfred
//last part of the script:
RemoteFileLoader.prototype.copyContent=function(domDoc,destId){
var src;
divs=domDoc.getElementsByTagName('div');
for (var i=0; i<divs.length; i++) {
if(divs.getAttribute('id')=='xmlbody'){
src=divs;
break;
}
}
alert('copyContent'+'\nsrc '+src+'\ndestId '+destId);
if(src==null){src=domDoc.getElementsByTagNameNS?domDoc.getElementsByTagNameNS(nsXhtml,'body')[0]domDoc.getElementsByTagName?domDoc.getElementsByTagName('body')[0]domDoc.body?domDoc.body:null))}
var
dest=document.getElementById?document.getElementById(destId)document.all?document.all[destId]:null);
if(!src||!dest)return;
alert('copyContent'+'\nsrc '+src+'\ndest '+dest);
if(document.implementation.hasFeature("Range","2.0")){
// this is the code for firefox
var range = src.ownerDocument.createRange();
range.selectNodeContents(src);
frag = range.cloneContents();
dest.appendChild(frag);
alert('copyContent'+'\nRange '+'\ndest.innerHTML '+dest.innerHTML);
}
else{
alert('copyContent'+'\ninnerHTML ');
if(src.innerHTML){
// this works fine in IE 6
dest.innerHTML=src.innerHTML;
alert('copyContent'+'\ndest.innerHTML '+dest.innerHTML);
}
}
};