source: code/Website/data-files/json-example.html@ 7849

Last change on this file since 7849 was 7849, checked in by dennisw, 15 years ago
File size: 1.0 KB
Line 
1<html>
2<head>
3
4<script type="text/javascript">
5
6function load()
7{
8 tmp = findSWF("ofc");
9 x = tmp.load('{"title":{"text":"hello"}, "x_axis":{"max":6},"elements":[{"type":"line","text":"moo","font-size":10,"values":[5,8,9,4,7,8]}]}');
10}
11
12function onrollout2()
13{
14 tmp = findSWF("ofc");
15 x = tmp.rollout();
16}
17
18function findSWF(movieName) {
19 if (navigator.appName.indexOf("Microsoft")!= -1) {
20 return window[movieName];
21 } else {
22 return document[movieName];
23 }
24}
25
26</script>
27
28</head>
29<body>
30
31<script type="text/javascript" src="../js/swfobject.js"></script>
32
33<div id="my_chart" style="padding: 0px; margin:10px; border: 1px solid lightblue; width: 250px; height: 200px;" onmouseout="__onrollout();"></div>
34
35<script type="text/javascript">
36var so = new SWFObject("../open-flash-chart/open-flash-chart.swf", "ofc", "250", "200", "9", "#FFFFFF");
37so.addParam("allowScriptAccess", "always" );//"sameDomain");
38so.write("my_chart");
39</script>
40
41<input type="submit" onclick="javascript:load()" value="go">
42</body>
43</html>
Note: See TracBrowser for help on using the repository browser.