The final argument embedSWFis the callback function, which is called when swf is inserted. It takes an event object with several properties indicating success / failure, etc. See the swfobject documentation for more on this .
swfobject.embedSWF(
"open-flash-chart.swf", "chart", "400", "180", "9.0.0", "expressInstall.swf",
{"data-file":"{% url monitor-graph %}"}, {}, {},
function(e) {
if(e.success) graph();
}
);
source
share