KB113: Using the GetURL action with AIML
One application of AIML chatbots is to let a character
help guide a user through a website. Since the AIML template portion of a
rule can contain any character actions, the easiest way to do this is to
use a <geturl/> action.
This sample shows a few variations on the <geturl/> action.
The template portion of an AI rule might read:
Ok, I will replace my page with a new one.
Without a target, the new page replaces the page with the flash file. The new page might also have a Character Builder project,
possibly even the same project.
In the FRAME rule we add as target the name of a second frame beside the character:
Ok, I will bring up a page in this frame.
If you specify '_blank' as a target then it is assumed to be a secondary window.
Ok, I will open a secondary window for you.
Popup windows require that your user enable popups in their browser.
Ok, I will popup another window for you.
Then, in the containing page, you can use a block of script such as: