Home
The Toolkit for Online Communities
17307 Community Members, 1 member online, 2221 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : How to create a simple 3rd party web service? : One Message

Forum OpenACS Q&A: Details of how to do replicate Loquacious

Collapse
Posted by Stan Kaufman on
I'm not sure what exactly Loquacious does on Philip's server, but here's one way to work it. To push dynamic content onto a non-OpenACS server's static page, you carve a spot in the static page by placing this Javascript snippet:
<SCRIPT LANGUAGE="JavaScript1.2">
<!--

with (document) {
write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='http://yourserver.com/yourtcl.tcl'>");
write("</SCRIPT>");
}

//-->
</SCRIPT>
Just do whatever DB stuff you want and append everything into a string and then ns_write it out at the end of the yourtcl.tcl page on your OpenACS site, thus:
set result [getallmyinfo ... ]
ns_write "document.write('$result');"
Thats all there is to it. I'm amazed.