babelfish
10-21-2002, 12:10 PM
ok i need to have a script that opens up a page then prints the contents of that page
function displayWindow(theURL,winName,width,height,features) {
var window_width = width;
var window_height = height;
var newfeatures= features;
var window_top = (screen.height-window_height)/2;
var window_left = (screen.width-window_width)/2;
newWindow=window.open(theURL, winName ,'width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',' + newfeatures);
newWindow.focus();
newWindow.print();
}
i have this but i get access denied when it tries to print it - is there some wierd way it does this? this is for IE only
thanks
function displayWindow(theURL,winName,width,height,features) {
var window_width = width;
var window_height = height;
var newfeatures= features;
var window_top = (screen.height-window_height)/2;
var window_left = (screen.width-window_width)/2;
newWindow=window.open(theURL, winName ,'width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',' + newfeatures);
newWindow.focus();
newWindow.print();
}
i have this but i get access denied when it tries to print it - is there some wierd way it does this? this is for IE only
thanks