+1
Answered
how to get bot name using javascript?
I want to get the value of the bot name and other variables using a javascript code inside my personal webpage. Do you have any solution?
Customer support service by UserEcho
The only way I can think of is to actually ask the bot the question (i.e. initiate a sayAIResponse call - "what is your name" ) and to grab the textual response from the vh_aiResponse callback.
Of course - the character will speak the response unless prevented. So you would need to mute the audio (setPlayerVolume), and prevent speech from starting by calling stopSpeech as soon as you receive the talkStarted event.
This approach is somewhat contrived and might not work perfectly - but it's the only approach I can think of.
Let us know how goes,
Regards
Gil
SitePal Team
Thanks for your response. I will try that. But as you said it might not a prefect solution. I am going to access other variables like username, gender, etc., which are defined inside the AIML codes.
I was thinking of sending these variables using tag and send it to a javascript function inside a template tag.