Open HTML type Attachments from a Knowledge Article in a new tab, instead of downloading it directly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello forum,
We have a requirement to open HTML type Attachments from a Knowledge Article in a new tab, instead of downloading it directly. We tried a few things but it didn't worked. Also referred to the below article, it works for pdf's and ppt's but not for html files:
https://www.servicenow.com/community/hrsd-articles/open-attachments-on-knowledge-articles-in-a-new-…
We also tried with the UI Page and client Script combination (Attached are the script files for reference) as per the suggestion from ChatGPT, that also did not worked with some fine tunings as well.
cc: @MahakG477595950
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
1) Try with enabling property (glide.knowman.use_document_viewer) and after that there will be a view button in front of attachments in Knowledge Article view.
OR
2) Using this tag
<a title="Test" href="<url of your doc>" target="_blank" >
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi Tanu,
Thanks for the response. It opens the other file but not the htm or html extension files. they are still downloaded.
