Having trouble getting graphics to print.( in both FF1.07 and IE6 )
I used the pie.js script from:
http://www.dynamicdrive.com/dynamicindex11/piegraph.htm
Am I missing something or doing something wrong.
ps I did try jg.setPrintable(true)
Thanks
Having trouble getting graphics to print.( in both FF1.07 and IE6 )
I used the pie.js script from:
http://www.dynamicdrive.com/dynamicindex11/piegraph.htm
Am I missing something or doing something wrong.
ps I did try jg.setPrintable(true)
Thanks
PLEASE: Include the URL to your problematic webpage that you want help with.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
I just did a little experimentation and the printing can be enabled by finding this line in wz_jsgraphics.js:
and changing it to true. However, this makes the page look horrible in IE6. No problem in FF. Perhaps there is an update on the author's site. You could have a link to an identical page that simply uses a version of wz_jsgraphics.js with that set as true, explain that it is the printable version and that it will look strange in some browsers but print fine (even with the messed up screen, the print preview looked fine in IE).Code:this.setPrintable(false);
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
For IE, I just discovered that this will work:
Placed in the head, it can reference the alternate version that looks bad onscreen but prints well. That way IE can have the good looking version online but, when it comes time to print, get the version that works. Opera will print either version well. It only remains how to get the FF people over to the printer friendly version. There could be a link to the printer version that only shows in FF:HTML Code:<link rel="alternate" media="print" href="pieprint.htm">
Code:<script type="text/javascript"> if (!(document.all)&&!(window.opera)) document.write('<a href="pieprint.htm">Printer Friendly Version</a>') </script>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
You can still try my above suggestion, it:
may work live but, it doesn't work locally. Here is an alternative scriptlet:Code:<link rel="alternate" media="print" href="pieprint.htm">
Code:<script type="text/javascript"> if (!window.opera) document.write('<a href="pieprint.htm" target="_blank">Printer Friendly Version</a><br>') </script>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
jscheuer1
Thanks for the info, I got it working by changing the setPrintable in wz_jsgraphics.js.
I was trying to do it from pie.js.
I'll also look at your other suggestion.
Thanks again.
Well if the <link alternate= thing won't work, here is a good way to do it -
On your pie page have this script above all of the code for the pie chart:
where pie.htm is the name of the page with your pie chart on it and then in wz_jsgraphics.js change:Code:<script type="text/javascript"> doprint=false if (!window.opera&&this.location.search.indexOf('doprint')==-1) document.write('<a href="pie.htm?doprint=true" target="_blank">Click for Printer Friendly Version</a><br>') if (this.location.search.indexOf('doprint')>-1) doprint=true </script>
to:Code:this.setPrintable(true);
That way you will not need any extra pages or script files.Code:this.setPrintable(doprint);
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks