dongwu9063 2014-08-22 12:59
浏览 92

Codeigniter:在Div中显示控制器的输出

I currently open a pop-up window, when a button is clicked.

The url passed is a controller, whose result is a chart image (the code to display the chart is written in the controller itself; there's no view).

How should I display the controller's output inside a div ? I no longer want to show a popup.

Here is my Javascript to invoke the chart-controller:

var newUrl = BASEURLINDEX + "/"+controller+"/index/"+studentid+"/"+class_level+"/"+"0"+"/"+resultid;

var left = (screen.width/2)-(700/2);
var top = (screen.height/2)-(500/2);

var myWindow = window.open(newUrl, "MsgWindow", "width=700, height=350, left=250, top=200");

And here is my chart-controller, that is opened in the Pop-Up window:

function index($studentid="",$level="",$exam_level="", $resultid="")
{           
    $combined = $this->database_connectivity($studentid, $exam_level, $resultid);

    /* Draw the line chart */
    $myPicture->drawLineChart();

    /* Write the chart legend */
    $myPicture->drawLegend(540, 20, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL));
}
  • 写回答

2条回答 默认 最新

  • dsiuz86842 2014-08-22 13:09
    关注

    Euh... Write the div tag inside the controller or just use a view (that would clean up your code....)

    ;-)

    评论

报告相同问题?

悬赏问题

  • ¥15 vscode问题请教
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM