Homesick

Members
  • Content count

    14
  • Joined

  • Last visited

Posts posted by Homesick


  1. I will give you the direct link to the charts:

    http://sdcjordan.com/english/index.php?option=com_public&security_type=1&chart=2

     

    In order to show the rest of the charts, please click on any year of the bar charts, now scroll down and click again on any month of the month's bar chart .. Now all the charts are rendered, in order to print this page go to the top of the page there is a button to print the charts as in the attached.

    post-9867-0-55443600-1350553529_thumb.jpg


  2. Thanks for rapid response ,,

     

    As per your request, I 've tried to collect the required code from multiple php and js files as following

     

    
    
    <table>
      <tr>
         <td id="page_content">
    
    <table>
    <tr>
         <td valign="top"><div id="chartdiv" align="center" > </div></td>
      </tr>
    </table>
    
    
    </td>
      </tr>
    </table>
    
    <img alt="image" src="images/printButton.png" class="title_icons" onclick="javascript:print_content();" />
    
    <form name="printForm" action="print.php" target="_blank" method="post" id="printForm">
     <input name="printcontent" type="hidden" id="printcontent" value="" />
    </form>
    
    <script type="text/javascript">
    var 	chart = new FusionCharts("../fusion_charts/Line.swf", "ChartId", "100%", "220", "0", "0");
    var strURL = "../public/Column3D.php?issuer_no=123456";
    strURL = escape(strURL);
    chart.setDataURL(strURL);
    chart.setTransparent(true);
    chart.render("chartdiv");
    
    
    
    function print_content() {
           var objContent = document.getElementById('printcontent');
           var objPageContent = document.getElementById('page_content');
           var objPrintForm = document.getElementById('printForm');
    
    objContent.value = objPageContent.innerHTML;
    
           objPrintForm.submit();
    }
    </script>
    
    

     

     

    When I press the img icon (printButton.png)--> function print_content() will send the chart to print.php page which is a user friendly page used to print the content of any page in my website. This mechanism is valid when I use it in i.e and firefox ,, the chart appears there with no problem, but in chrome and safari does not.

     

    I hope the above Idea is clear,, if not, please do not hesitate to ask ,,

    thanks


  3. Basundhara Ghosal (8/23/2010)
    Hi,

     

     

     

    Welcome to FusionCharts forum. :)

     

     

     

    It seems that you are adding the HTML content along with the Div content which might create some problem in browsers like IE.

     

     

     

    In that case you need to re-render the chart with inner HTML befor printing it.

     

     

     

    Hope this helps.

     

     

     

    Dear Basundhara ,

     

     

     

    Thanks a lot for your reply,

     

     

     

    but please could you tell me where to re-render the chart in my code?


  4. Dear Guys ,,

     

     

     

    I am trying using JavaScript to print selective Div in the page which include a chart using this code:

     

     

     

     

     

    var printContent = document.getElementById('popupContact');

     

    var windowUrl = 'about:blank';

     

    var uniqueName = new Date();

     

    var windowName = 'Print' + uniqueName.getTime();

     

    var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=200,height=200');

     

     

     

    printWindow.document.write(printContent.innerHTML);

     

    printWindow.document.close();

     

    printWindow.focus();

     

    printWindow.print();

     

    printWindow.close();

     

     

     

    where "popupContact" is the div element which includes the charts I want to print out ,,

     

     

     

    When I do so,, the charts did not appear!!, but if I use print from file menu in the browser the chart appears no problem ,,

     

     

     

    So please tell me how to handle it ??

     

     

     

    Thanks

     

    Homesick