[plt-scheme] html in servlets
This would work for:
<script language="JavaScript">
if (a < b)
a = b;
</script>
(because of the < symbol)
-----Original Message-----
From: plt-scheme-admin at list.cs.brown.edu
[mailto:plt-scheme-admin at list.cs.brown.edu] On Behalf Of Anton van Straaten
Sent: Sunday, May 16, 2004 5:46 PM
To: plt-scheme
Subject: RE: [plt-scheme] html in servlets
For list-related administrative tasks:
http://list.cs.brown.edu/mailman/listinfo/plt-scheme
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