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 Calling_external_JavaScript_functio  

Calling_external_JavaScript_functio

Press enter to accept Project Name or type a new descriptionalling_external_JavaScript_functions

Category: Viewer 2
By : Becky Pippen
Created: 2010-09-02 Edited: 2010-09-02
Worlds: Second Life

the Zip file

Download all files for Calling_external_JavaScript_functio
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Calling_external_JavaScript_functio_1.lsl
1 integer face = 4;
2 string externalJavascript =
3 "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";
4 default
5 {
7 {
8 string dataURI = "data:text/html," +
9 "<head><script src='" + externalJavascript + "'></script></head>" +
10 "<button>Toggle</button>" +
11 "<p>Hello<br />World</p>" +
12 "<script>$('button').click(function () " +
13 "{$('p').slideToggle('slow');});</script>";
14
15 llSetPrimMediaParams(face,
16 [PRIM_MEDIA_CURRENT_URL, dataURI]);
17 }
18 }

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