Forum Moderators: open

Message Too Old, No Replies

Error when printing Frame in IE6

         

niteskie

4:26 pm on May 31, 2002 (gmt 0)



parent.Printable.focus();
parent.Printable.print();

On my page I have a print button, once it is pushed it changes focus to the frame I want to print "Printable", and then it prints it. This works fine for IE5.5, but IE6 gives me an error message: Invalid procedure call or argument.

Any suggestions? Or is there a better way I should be doing this?

Thanks

tedster

12:06 am on Jun 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm struggling with this, and not sure what you're running into.

Is the page you are trying to print (the one inside the frame) on the same domain as the frameset? If it's a different domain, you could be running into some of privacy enhancements and security tightening in IE6.

Other than that, I'm in the dark right now.

niteskie

3:20 am on Jun 1, 2002 (gmt 0)



They are on the same server, in the same directory. I have two frames, one in which the user inputs all their information, and the other frame where I display the information. When the user clicks on the print button which is located in the input frame, it changes the focus to the other frame, and then calls print.

tedster

5:26 am on Jun 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The snippet you've copied looks good to me - assuming everything dependent on it is taken care of properly ... and the print function is called from a FORM button click, I assume, or perhaps an HTML anchor tag.

I'm stumped. Everything I can think of would make problems in IE 5.5 too.

niteskie

6:13 am on Jun 1, 2002 (gmt 0)



Here is the page

<sorry - no personal urls in posts>

(edited by: tedster at 12:09 pm (utc) on June 1, 2002)

tedster

12:52 pm on Jun 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



niteskie, the error you get is coming from a dll file - namely SHDOCLC.dll - that is blowing up when you try to access the printer.

I've done a bit more research and I'm pretty sure your JavaScript code is theoretically correct. But this particular dll file (which controls print preview, among other functions) has been buggy in various ways over several versions of Explorer.

It has also been the target of a few security exploits - which means that MS has had to patch it more than once.

All in all, I've read enough to tell you that Microsoft is probably your best chance of getting some help on the issue. I wish my news was better - that's an elegant utility you're working on.

If your page is only for limited use (rather than public use) you might want to try downloading the May 15, 2002 patch for Explorer, which does modify this particular dll file. If it works, just let users know they need to do the IE patch (which is a good idea anyway - for security's sake).

If you want to allow open access/use of your page, however, it looks to me like you can pretty much count on problems.

<added>The dll problem only comes because you're adding a Print feature to the page itself. That's a nice extra, but the browser's native Print function should work fine.</added>

niteskie

4:37 pm on Jun 7, 2002 (gmt 0)



Even if I remove the print button, and just use file and print to print out the right side of the pane, it gives me the error.

I have a workaround in place. When the print button is pushed I open the page I want printed in a new window, and then use the print command, and it seems to work fine now.

If you still have the link you can see what I did, or if you'd like I can email it to you.

Thank you for your help