cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Markdown - Open hyperlink in same tab using web chat or web client

Former Member
0 Likes
1,537

Hi,

I'm building a chatbot with web chat and web client. My chatbots are using hyperlinks in the message via Markdowns. When someone clicks the links, it opens in a new tab. I can't have that. Someone could have 10 different tabs open by clicking the links.

How would I set this up so that each time the link is clicked, the page opens in the same tab instead of opening a new tab?

Thanks and I look forward to your answer!

View Entire Topic
0 Likes

Hi freelegal1 ,

Please Download and save this file as JS --> webchat.txt in your local directory where your html page is present. Inside HTML code, do the following changes

  • Use this
<script src="js/webchat.js"
  • instead of
"<script src="https://cdn.cai.tools.sap/webchat/webchat.js" 

It worked for me. Let me know whether it worked.

Thanks,

Shanmugam

Former Member
0 Likes

Shanmugam ,


Thanks for the reply. I'll try and let you know. I have another question. I would like to embed the chatbot on the webpage itself instead of having a popup chatbot. Essentially, embedding the chatbot like any other element on the page. I've tried using <iframe> but it doesn't work. It only shows code in the iFrame window. Will loading the webchat.txt as .js cure that? Do you or anyone else have any suggestions?

Thanks a lot,

Fred