Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "Not allowed to navigate top frame to data URL" #2134

Open
JackSadowski opened this issue Dec 9, 2024 · 0 comments
Open

Error: "Not allowed to navigate top frame to data URL" #2134

JackSadowski opened this issue Dec 9, 2024 · 0 comments

Comments

@JackSadowski
Copy link

Hi,
I am fairly new to javascript.
I load images from a database. Images show on page. However, when I click on an image, I get the above error.
When check with F12, it looks like both scripts load fine.
No other errors, except this one following the mouse click.

Thanks. I appreciate your help.

My code:

<script type="module">
  import PhotoSwipe from '../Content/PhotoSwipe/photoswipe.esm.min.js';
  import PhotoSwipeLightbox from '../Content/PhotoSwipe/photoswipe-lightbox.esm.js';

const lightbox = new PhotoSwipeLightbox({
            gallery: '#my-gallery',
            children: 'a',
            pswpModule: PhotoSwipe
        });
        lightbox.init();
</script>

<div class="my-gallery">
        <asp:Repeater ID="rptImages" runat="server">
            <ItemTemplate>
                <a href='<%# Eval("ImageDataBase64") %>'
                    data-id='<%# Eval("ImageID") %>'
                    data-pswp-width='<%# Eval("ImageWidth") %>'
                    data-pswp-height='<%# Eval("ImageHeight") %>'>
                    <img title="frameTitle"
                        src='<%# Eval("ImageDataBase64") %>'
                        alt="Image Thumbnail"
                        style="max-width: 200px;" />
                </a>
            </ItemTemplate>
        </asp:Repeater>
    </div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant