in reply to Sharing JS-Code on perlmonks.org
Basically there is no official way to share JavaScript except posting it. By doing so, you are at the mercy of the poster, which is a huge security issue. You can embed any JavaScript posted in <code> tags by using the "download" link:
<script src="?abspart=1;displaytype=displaycode;node_id=764848;part=3" +> </script>
Example JavaScript:
alert("Hello embedded JavaScript")
Of course, you should use a framework like jQuery for doing the XMLHttpRequest and callback for you. Wrapping nodes or services so they return JSON or data in a format more easily digested by JavaScript will need some writing of code.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Sharing JS-Code on perlmonks.org
by LanX (Saint) on May 19, 2009 at 09:48 UTC | |
by Corion (Patriarch) on May 19, 2009 at 10:02 UTC | |
by LanX (Saint) on May 19, 2009 at 10:11 UTC | |
by Anonymous Monk on Nov 26, 2010 at 10:33 UTC |