[plt-scheme] html in servlets

From: ifconfig nslookup (nslookupifconfig at hotmail.com)
Date: Sun May 16 16:20:01 EDT 2004

This would work for:
<script language="JavaScript">
  if (a < b)
    a = b;

(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:

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.