Click to See Complete Forum and Search --> : Netscape, Printing Dynamic Elements


AndyHibbins
08-05-2004, 06:02 AM
I have been given a problem to solve and have come up with nothing so far.

A page brings in variables stored in an opener.parent location. It reads them fine and displays them correctly.

The problem arises when the user tries to print this page. In Netscape 4.75 it loses the values held in these variables and throws up errors saying that opener.parent has no properties and seems to lose all link with these pages, despite the fact that the information is still being displayed.

I have a theory that Netscape creates a new session when it prints and therefore cannot print this dynamic page but would like to proven wrong and be given a solution if anyone has any ideas. If this is right can someone send me in the right direction for some documentation outlining this issue as I need to show something solid to the powers that be.

Thanks.

gil davis
08-05-2004, 06:06 AM
It would help if you posted a link.

My first suspicion is that you are using onclick to print and you have not cancelled the default action (by using "return false") causing the browser to reload and lose the opener relationship.

AndyHibbins
08-05-2004, 06:08 AM
Sorry can't post a link. It's not on a public site.

the window.print is in the href:

<a href="javascript:window.print()">

BillyRay
08-05-2004, 06:12 AM
Andy,

You are correct - NN4 does reload the page when printing, so any variables, values, etc that were calculated after the page was delivered will be lost.

I don't believe there is a workaround to this.

I ran into this problem a few years back, and in the end had to create a "Print Friendly" page with no form elements, etc on it. You might try this as a workaround for the older browsers.

Either that, or try and convince the older browser users to upgrade - NN4 is really old, really flaky, and supports no newer CSS or DOM standards - what other reasons do you need? :D

Hope this helps,
Dan

AndyHibbins
08-05-2004, 06:21 AM
Thanks mate.

some people you just can't explain why they should upgrade but makes life interesting.:D

gil davis
08-05-2004, 01:52 PM
Originally posted by AndyHibbins
<a href="javascript:window.print()">
Have you tried this?
<a href="#" onclick="window.print();return false">