0
Views
1
Comments
Java script error
Question
hi, i'm having this error:

"Factory is undefined"

the same script in html pages work proprely but not in OS, the code i have is:


<object id=factory style='display:none'
classid='clsid:1663ed61-23eb-11d2-b92f-008048fdd814'
codebase='https://bb-acornet\Net\Objects\ScriptX\ScriptX.cab#Version=6,1,429,14'>
</object>

<script language='javascript'>
function doprint(header,footer) {
//save existing user's info
var h = factory.printing.header;
var f = factory.printing.footer;
//hide the button
//document.all('printbtn').style.visibility = 'hidden';
//set header and footer to blank
factory.printing.header = header;
factory.printing.footer = footer;


var x = factory.printing.getMarginMeasure();
var iMargin = 5;

if (x == 2)
iMargin = 0.2;


factory.printing.leftMargin = iMargin;
factory.printing.rightMargin=0;
factory.printing.topMargin=0;
factory.printing.bottomMargin=0;
//factory.printing.printBackground = true;



//alert(factory.printing.getMarginMeasure());
//alert(x);

window.print();

//print page without prompt

//factory.DoPrint(false);

//restore user's info

//factory.printing.Print(false, window)

//print();

factory.printing.header = h;
factory.printing.footer = f;
//show the print button
//document.all('printbtn').style.visibility = 'visible';
}
</script>

can somebody help?

tks


UserImage.jpg
Olivier Carneiro
Hi Claudia,

Could you please attach all the source of your page? Do your page has any Javascript code that hides the factory object?

Thanks,
Olivier
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.