How To Display Several Messages On Screen With Watson Conversation
I'm working on a chatbot with Watson technology and more precisely with conversation service. It's my first application on Bluemix and with javascript and i have an issue with the
Solution 1:
There is a much easier approach. JS allows you to 'join' all the elements in an array:
text = response.output.text.join(" ");
That should do the trick!
Solution 2:
I found a solution, a litlle savage but it's working currently so if someone have a better solution i will take it.
I create an array like in my post then when i instatiate my bubber.innerHTML i do
bubble.innerHTML = "<div class='bot'>" + tab[0] + tab[1]+ tab[2] + tab[3] + tab[4] +tab[5] + tab[6]+ tab[7]+ "</div>";
Because my array is always taller than 7
Post a Comment for "How To Display Several Messages On Screen With Watson Conversation"