[pandorabots-general] Using Javacript to mainpulate an AIML response and send to a SitePal agent

E. Vincent Cross II crossev2000 at yahoo.com
Mon May 1 18:24:29 PDT 2006


Hello all, I have run into an issue using AIML along
with a SitePal agent.  Currently my AIML code accepts
some input.  I than use Javascript to manipulate that
input as shown below.  AIML than sends a response to
the SitePal agent.

<category>
	<pattern>
	help equation *
	</pattern>
	<template>
		Based on this word problem here are the  
values that you need to focus on 

<script type="text/javascript">
<![CDATA[
    var equation = "<star/>" ;
     document.write(equation.replace(/x/g, " ex"));
]]>
</script>

	</template>
</category>

The problem I am having is that when the response is
sent back to the SitePal agent actually speaks the
javacode.  
The agent will say "var equation ="star />"........

I believe what is happening is that the AIML
interpreter is sending the actual javascript back
because it believes it is being sent to an browser to
be interpreted however in my case it is being sent to 
 an SitePal agent which just speaks the information. 
Any help on resolving this issue will be great.


Thanks
Vince

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the pandorabots-general mailing list