Search code examples
javascriptdelphiindy

Can Indy run Javascript?


There is a software product called AnyChart which is great for embedding Flashed based charts in web pages. AnyCharts can also export to PNG file format. Here is an example:

<script type="text/javascript" language="javascript">
    //<![CDATA[
    var chart = new AnyChart('http://www.mysite.com/swf/AnyChart.swf');
    chart.width = 600;
    chart.height = 300;
    chart.setXMLFile('http://www.mysite.com/anychart.xml');
    chart.addEventListener("draw", function() { saveChartAsImage(chart); });
    chart.write("content-box");
    //]]>
</script>

My ultimate goal is to make a automated service to export the AnyChart charts to PNG format. So I made a service with Indy which calls pages containing the AnyChart javascript. But the problem seems to be that Indy cannot execute the javascript.

Is there a way to enable Indy to execute javascript?


Solution

  • No, Indy does not execute Javascript. You may have also noticed that it doesn't parse or display HTML, and it doesn't run Flash, either. Indy does network protocols.

    You could import the Microsoft Script Control ActiveX object and have that run your Javascript. If you need details on that, post a new question.