Skip to Content
0
Former Member
Aug 24, 2007 at 05:10 PM

Print preview error : 'factory is undefined'

40 Views

Hi Frineds,

We implented How to guide with Quick printing.

when i select printpreview with Internet explorer i am getting the following error message:

Line: 804

Char: 5

Error: 'factory' is undefined.

Code: 0

URL: ................

we are getting in this error in the webtemplate: ZPD_ADHOC_PAGE

The code is look like in the webtemplate:

</SCRIPT>

<STYLE>

input.ie55

</STYLE>

<!-- special style sheet for printing -->

<STYLE media=print>

.noprint

</STYLE>

<script defer>

function window.onload() {

if (!factory.object) {

return

}

else {

factory.printing.header = "SAP"

factory.printing.footer = "SAP"

if ( varPaperSize == "2" ) { factory.printing.portrait = true; }

else { factory.printing.portrait = false; }

factory.printing.Print(true);

// enable control buttons

/* var templateSupported = factory.printing.IsTemplateSupported();

var controls = idControls.all.tags("input");

for ( i = 0; i < controls.length; i++ ) {

controls<i>.disabled = false;

if ( templateSupported && controls<i>.className == "ie55" )

controls<i>.style.display = "inline";

} */

}

}

</script>

<P>

<div id=idControls class="noprint" style="VISIBILITY: hidden">

<input disabled type="button" value="Print this page"

onclick="factory.printing.Print(true)">

<input disabled type="button" value="Page Setup..."

onclick="factory.printing.PageSetup()">

<input class=ie55 disabled type="button" value="Print Preview..."

onclick="factory.printing.Preview()">

<input class=ie55 disabled type="button" value="Landscape"

onclick="factory.printing.portrait=false">

<input class=ie55 disabled type="button" value="Portrait"

onclick="factory.printing.portrait=true">

</div>

</BODY>

</HTML>

What could be the causing the error.

Please provide ur suggestion how to fix this issue.

will assign points.

Thanks

SAP