Here is the code snippet I am working with:
<head>
# load js
<script>
function graph() {
swfobject.embedSWF(
"open-flash-chart.swf", "chart", "400", "180", "9.0.0", "expressInstall.swf",
{"data-file":"{% url monitor-graph %}"});
};
</script></head>
<div id="chart"> </div>
<script>
graph();
</script>
My goal is to trigger the graph function only when the swf file has not been loaded yet. Does anyone have a suggestion on how to achieve this? Thank you!