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.