License Public Domain
Lines 5
Keywords
MooTools (5) OpenFlashCharts (1)
Permissions
Owner: Stou S.
Viewable by Everyone
Editable by All Siafoo Users
Hide
Stay up to dateembedded code automagically updates, each snippet and article has a feed Join Siafoo Now or Learn More

Change Open-Flash-Chart-2 data using Mootools Atom Feed 0

In Brief A quick way to reload and embedded Open Flash Chart 2 object using remote JSON data.... more
# 's
1new Request.JSON({url: "/my_data.json", 
2 onComplete: function(jsonData, jsonStr){
3 $('my-graph').getElement('embed').load(jsonStr)
4 }
5 }).get()

A quick way to reload and embedded Open Flash Chart 2 object using remote JSON data.

If you need to create the object using JavaScript, check out the MooTools Swiff class or the standalone SWFObject

This snippet assumes you have your Open Flash Chart 2 object inside the HTML page like this:

# 's
 1<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
2 codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
3 width="800" height="300" id="my-graph" align="middle">
4 <param name="allowScriptAccess" value="sameDomain" />
5 <param name="movie" value="/flash/open-flash-chart.swf" />
6 <param name="quality" value="high" />
7 <embed src="/flash/open-flash-chart.swf" quality="high"
8 bgcolor="#FFFFFF" width="800" height="300"
9 name="open-flash-chart" align="middle"
10 allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
11 pluginspage="http://www.macromedia.com/go/getflashplayer">
12 </embed>
13</object>