Print a document without showing it? I'm almost there... but...

Discussion in 'Javascript' started by Julius Mong, Apr 17, 2004.

  1. Julius Mong

    Julius Mong Guest

    Dear all, I have :

    function printPage() {

    top.printer.location.href="svg/"+svg[document.getElementById("currIndex").va
    lue]+"_1.svg";
    setTimeout("top.printer.focus();top.printer.print();", 5000);
    }

    in a frame called right in ta frameset:

    <frameset cols="150,465,185,*" bordercolor='#ffffff' border='0' >
    <frame name='left' src='left.html' scrolling='auto' border='0' />
    <frame name='center' src='page.html' scrolling='no' border='0' />
    <frame name='right' src='right.html' scrolling='auto' border='0' />
    <frame name='printer' src='blank.html' scrolling='auto' border='0' />
    </frameset>

    Now I run the function printPage in right.html to load an svg document in
    printer frame and then gain focus and print it. If I set the cols to 150, *,
    185, * (i.e. showing the printer frame in the viewable win area) then it
    prints fine with the svg loaded, but if i did just 150,465,185,* (i.e. not
    showing the printer frame), no matter how long I wait for hte SVG to load
    using setTimeOut it will print a blank page...

    Can someone tell me what I'm missing? Or am I out of luck here?

    Thanx, Jules
     
    Julius Mong, Apr 17, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.