开发者

Open Flash Chart on Zend MVC Error

I recently downloaded the Open Flash Chart source code and I have intergrated it into my Zend MVC.Since I use the autoloader I have renamed my files and commented the "require_once" source lines.

However when I try to load my chart

<script type="text/javascript">
    swfobject.embedSWF(
        "<?php echo $this->baseUrl() ?>/swf/open-flash-chart.swf", 
        "my_chart", "550", "200",
        "9.0.0", 
        "<?php echo $this->baseUrl() ?>/swf/expressInstall.swf",
        {"data-file":"<?php echo $this->baseUrl()?>/reportexpense/piechart/"}
    );
    </script>

it loads the "/data-file开发者_如何学JAVAs/y-axis-auto-steps.txt" instead and I cant figure out why.

My controller returns the JSON string which I expect to be rendered. What am I missing?


Just to help out those who might come across the same problem. I adjusted my code to read

<script type="text/javascript">  

 swfobject.embedSWF(
            "<?php echo $this->baseUrl() ?>/swf/open-flash-chart.swf", 
            "my_chart", "550", "200",
            "9.0.0", 
            "<?php echo $this->baseUrl() ?>/swf/expressInstall.swf",
            {"get-data":"get_data_1"}
        );

 function ofc_ready()
 {
     //alert('ofc_ready');       
 }

 function get_data_1()
 {      
     return JSON.stringify(<?php echo $this->myreport?>);        
 }

</script>

It worked perfectly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜