# Open file url in new tab

**URL:** <https://forum.bubble.io/t/open-file-url-in-new-tab/158737>\
**Category:** Need help\
**Created:** [July 6, 2021, 12:39pm UTC](https://forum.bubble.io/t/open-file-url-in-new-tab/158737 "2021-07-06T12:39:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesleese5](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@jamesleese5](https://forum.bubble.io/u/jamesleese5)\
**Post date:** [July 6, 2021, 12:39pm UTC](https://forum.bubble.io/t/open-file-url-in-new-tab/158737/1 "2021-07-06T12:39:52Z")

</div>

When a group is clicked I want to open a new tab with pdf url…however my tab is blank.

I’m using the run javascript action: window.open(“file’s\_url”)

Any tips appreciated!

---

<div class="post-metadata">

**Author:** ![jon2](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jon2](https://forum.bubble.io/u/jon2)\
**Post date:** [July 6, 2021, 12:59pm UTC](https://forum.bubble.io/t/open-file-url-in-new-tab/158737/2 "2021-07-06T12:59:40Z")

</div>

I’d double check that URL in `debug_mode` using run ‘step by step’ and look at your browser console to make sure there aren’t any JS errors blocking this code from running.

`window.open()` should work just fine in bubble. If its a stored file in bubble AWS, like say a PDF, it could be possible that the bubble’s [protocol-relative URL format](https://en.wikipedia.org/wiki/Wikipedia:Protocol-relative_URL) may not be compatible with your browser client. In this case, you might try adding in `https:` in front of your URL to make the protocol explicit

---

<div class="post-metadata">

**Author:** ![jamesleese5](https://avatars.discourse-cdn.com/v4/letter/j/5fc32e/32.png) [@jamesleese5](https://forum.bubble.io/u/jamesleese5)\
**Post date:** [July 6, 2021, 1:16pm UTC](https://forum.bubble.io/t/open-file-url-in-new-tab/158737/3 "2021-07-06T13:16:37Z")

</div>

thanks for the suggestion @jon2 . Using step by step debug I saw that the dynamic url was not showing due to privacy settings…

Working now.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [September 14, 2021, 12:40pm UTC](https://forum.bubble.io/t/open-file-url-in-new-tab/158737/4 "2021-09-14T12:40:11Z")

</div>

Closed on September 14, 2021, 12:40pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
