Hi Team,
I am trying to implant the js and html files created for Chat bot within the web application.
The chat bot is working fine when opened using browser.
It includes the following files
1.index.html
2.chat.css
3.home.css
4.chat.js - includes the function of buttons
5.responces.js- includes the functionalities added to get responses.
Can you kindly guide me where and in which activity should I have to put the above codes in web application.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @vaishbharathi
You can load these files into the file resource folder and then place them on the web application, just like any other file. Alternatively, you can use the chat bot CDN.
The 'Index.html' will be placed in the page activity where you can modify all other sources and links to the CSS files.
OR
You can build your own JSP page to override the web application.
Is 'responses.js' responsible for saving responses to the chat bot? There should be some examples on the webpage demonstrating how to implement the chat bot. Previously, I only inserted JavaScript and added some setup similar to Google Analytics.
Marcel
Hello @vaishbharathi
You can load these files into the file resource folder and then place them on the web application, just like any other file. Alternatively, you can use the chat bot CDN.
The 'Index.html' will be placed in the page activity where you can modify all other sources and links to the CSS files.
OR
You can build your own JSP page to override the web application.
Is 'responses.js' responsible for saving responses to the chat bot? There should be some examples on the webpage demonstrating how to implement the chat bot. Previously, I only inserted JavaScript and added some setup similar to Google Analytics.
Marcel
'responses.js' will take the input questions from the user and provides the output.
For example:
// Calculator functionality
if (isMathExpression(input)) {
const result = calculate(input);
return `The result is: ${result}`;
}
// Function to perform basic calculator operations
function calculate(input) {
try {
const result = eval(input);
return !isNaN(result) ? result : "Error";
} catch (error) {
return "Error";
}
}
Thank you for your ideas!
Views
Replies
Total Likes
Yes you need to use Page activity in web app to place client side js and back and side JS as needed <%var backEndside = function(){....}/%>
Marcel
Views
Likes
Replies