Hello Glitch Community,
I’m working on a chatbot application hosted on Glitch, designed to provide users with clickable links that redirect them to external sites for registrations and bookings. However, I’m encountering a problem where the links generated by the chatbot are not clickable. I’m seeking assistance to resolve this issue.
Description of the Issue:
- The chatbot generates a URL as a part of its response to user queries.
- This URL is intended to be a clickable link, taking users to an external site (e.g., a booking platform).
- When users click on the link, nothing happens. The link appears in the chat interface but lacks the expected functionality.
Error Message:
When clicking on the link, the browser console displays the following error:
csharp
Blocked opening [URL] in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.
Steps Taken to Resolve the Issue:
- Checked the
href
Attribute: Ensured that thehref
attribute of the link (<a>
tag) is correctly set to the intended URL in the JavaScript code. - Inspected the Link Element: Used the browser’s developer tools to inspect the link element, verifying that the
href
attribute is properly populated. - Sandbox Attribute in iframe: Since the application is hosted on Glitch, which runs applications in a sandboxed environment, I considered that the issue might be related to sandbox restrictions. However, I’m not using an iframe directly in my application.
- Alternative Approaches: Contemplated instructing users to right-click the link and open it in a new tab manually, or changing the link to open in the same tab (
target="_self"
). However, these solutions are not ideal for the user experience I aim to provide.
Request for Assistance:
I’m looking for guidance on how to enable clickable links that open in new tabs/windows within the Glitch platform’s sandboxed environment. Specifically, how can I overcome the ‘allow-popups’ permission issue in this context? Any insights or suggestions from the community would be greatly appreciated.
Thank you for your time and help!