[plt-scheme] html in servlets
Zhu Chongkai wrote:
> Then how to use JavaScript in servlets? (that is, some
> code that can run at the client)
Javascript code is either contained as the content of a SCRIPT element, or
contained in an external file, so there shouldn't be any problem with it,
because it's not interpreted as HTML.
I don't use XML boxes myself, but I use Javascript in s-exp code (x-exprs)
like this:
(script ([src "someprogram.js"]))
(script "function getValue() { return 42; }" )
Note that in the second case, in an XML box, you shouldn't need to quote the
strings. You should just be able to write:
<script>
function getValue() { return 42; }
</script>
If that doesn't work, post the details.
Anton