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));
}