[alicebot-general] Javascript
Noel Bush
alicebot-general@list.alicebot.org
14 Mar 2002 21:26:05 +0300
The javascript you are allowed to use in the <javascript> element is
server-side javascript. So there is no document object to which you can
write (unless you create one). Here is the javascript test case from
dev-testcases.aiml. It should produce "Test passed.":
<javascript>
var last = " passed.";
var first = "Test";
first + last;
</javascript>
Scripts in the dev-scripts.aiml may not work because some of them fail
to terminate all lines with semicolons, and/or because the 4.1.4 parser
deals poorly with single-line comments.
On Thu, 2002-03-14 at 21:11, Daniel Ball wrote:
> First, I edited the server.properties file so that the javascript element is
> allowed.
>
> So I tried a very simiple javascript just to test whether it was working.
> For example,
>
> <javascript>
> document.write("This is a test to see if javascript is working")
> </javascript>
>
> But nothing happens. So I looked in my interpreter log and saw this error
> message: "Javascript returned null!"
>
> I noticed that when I try to trigger the same scripts that Jon Baer wrote in
> the 'dev-scripts.aiml' file, these don't work either. They cause the same
> "returned null" message as before.
>
> Is there anyone who can explain this, and/or explain how I can use
> javascript in my aiml?
>
> Thanks,
> Daniel
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
> _______________________________________________
> This is the alicebot-general mailing list
> Reply to alicebot-general@list.alicebot.org
> Unsubscribe and change preferences at http://list.alicebot.org/mailman/listinfo/alicebot-general
> Learn netiquette at http://www.dtcc.edu/cs/rfc1855.html
> Learn to read at http://www.literacy.org/
>