Question


based on this web, i like to use that light box to show image that was generated by this php code :

<?php
include "libchart/classes/libchart.php";

header("Content-type: image/png");

$chart = new VerticalBarChart(700,250);

$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("Bekasi", 873));
$dataSet->addPoint(new Point("Jakarta", 10));
$chart->setDataSet($dataSet);

$chart->setTitle("UTLC testing chart");
$chart->render();
    ?>


my question : can we use php code with header content to generate image in that light box and show it?
thanks anyone and sorry for my bad english.

Was it helpful?

Solution

Lightbox is a JS library therefore returning an image won't work. You can use PHP to build the response page so that the lightbox will trigger when the page has loaded however.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top