Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Viewer 2 Google_Chart_demo  

Google_Chart_demo

Google_Chart_demo

Category: Viewer 2
By : Pavcules Superior
Created: 2010-09-02 Edited: 2010-09-02
Worlds: Second Life

the Zip file

Download all files for Google_Chart_demo
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Google_Chart_demo_1.lsl
1 show(string html)
2 {
3
4 llOwnerSay(html);
5
6 llSetPrimMediaParams(0, // Side to display the media on.
7 [PRIM_MEDIA_AUTO_PLAY,TRUE, // Show this page immediately
8 PRIM_MEDIA_CURRENT_URL,html, // The url if they hit 'home'
9 PRIM_MEDIA_HOME_URL,html, // The url currently showing
10 PRIM_MEDIA_HEIGHT_PIXELS,512, // Height/width of media texture will be
11 PRIM_MEDIA_WIDTH_PIXELS,512]); // rounded up to nearest power of 2.
12 }
13
14 // This creates a data: url that will render the output of the http-in url
15 // given.
16 string build_url()
17 {
18 return "data:text/html,
19 <html>
20 <head>
21 <script type=\"text/javascript\">
22
23 function makeRequest()
24 {
25 var oChart = document.getElementById('chart');
26 var v2 = 100 - document.getElementById('d1').value;
27
28 oChart.src = 'http://chart.apis.google.com/chart?chs=500x200&chd=t:' + document.getElementById('d1').value + ',' + v2 + '&cht=p3&chl=Hello|World\';
29 //document.body.appendChild(oScript);
30 }
31
32
33 </script>
34 </head>
35 <body>
36 Value:<input id=\"d1\" type=\"text\" />
37 <input type=\"button\" value=\"Click Me\" onclick=\"makeRequest()\" />
38 <img id=\"chart\" />
39 </body>
40 </html>";
41 }
42
43
44 default
45 {
47 {
48 show(build_url());
49 }
50
51 }

Back to the Best Free Tools in Second Life and OpenSim.