W
Wang, Jay
I try to open up a window with window.open in javascript. "domain.html"
contains domain information 'domain.school.edu'. The "Access denied" problem
happens when document.write is trying to put variable s into the new window.
Sometimes, it writes successfully, while other times the popup error is
"access denied". How to solve this problem? thanks
____________________________
function setup(){
var w =
window.open("domain.html","Print","menubar=yes,toolbar=no,scrollbars=yes,status=no,resizable=yes");
w.document.domain = 'domain.school.edu';
var message = SVGDoc.getElementById("rangeplot") ? "drawrange" : "";
var hd = crawl_down(1, document.documentElement, function(o){return
o.tagName=="HEAD"});
// alert('Plot window is opened');
var s = "<html>"+hd.outerHTML;
s +="<body onload='printing_only(event)'>";
s +=document.getElementById("plotmenustyle").outerHTML;
s +="<div id='demor'
style='margin-top:10;margin-left:100'>"+pat_info()+"</div><div id='msg'
msg='"+message+"'></div>"+ftplt.outerHTML+"</body></html>";
w.document.write(s);
w.location.reload(false); //necessary to trigger onload event
}
contains domain information 'domain.school.edu'. The "Access denied" problem
happens when document.write is trying to put variable s into the new window.
Sometimes, it writes successfully, while other times the popup error is
"access denied". How to solve this problem? thanks
____________________________
function setup(){
var w =
window.open("domain.html","Print","menubar=yes,toolbar=no,scrollbars=yes,status=no,resizable=yes");
w.document.domain = 'domain.school.edu';
var message = SVGDoc.getElementById("rangeplot") ? "drawrange" : "";
var hd = crawl_down(1, document.documentElement, function(o){return
o.tagName=="HEAD"});
// alert('Plot window is opened');
var s = "<html>"+hd.outerHTML;
s +="<body onload='printing_only(event)'>";
s +=document.getElementById("plotmenustyle").outerHTML;
s +="<div id='demor'
style='margin-top:10;margin-left:100'>"+pat_info()+"</div><div id='msg'
msg='"+message+"'></div>"+ftplt.outerHTML+"</body></html>";
w.document.write(s);
w.location.reload(false); //necessary to trigger onload event
}