[plt-scheme] html in servlets

From: Anton van Straaten (anton at appsolutions.com)
Date: Sun May 16 11:45:36 EDT 2004

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:

function getValue() { return 42; }

If that doesn't work, post the details.


Posted on the users mailing list.