简体   繁体   中英

Shadowbox.js downloads html files instead of displaying them in an iframe

I'm pulling my hair out over this one. I'm using a very simple version of shadowbox - it works correctly when I'm using images but when I use a URL to display in the modal, it will open a blank shadowbox and then download the html link in the href as a file to my downloads folder.

        <a class="galleryItem" rel="shadowbox[Gallery];height=165;width=640;player=iframe;" href="/Bios/MR.html" title="MR">

And the simple init is just this:

    $(document).ready(function() {
        Shadowbox.init({
            player: "iframe",
            handleOversize: "drag"
        });
});

I've tried so many variations of the options at this point and I'm stuck.

This one has been resolved - I left out one detail I didn't think was relevant at the time but I was on an O365 environment and changing the file extensions from .html to .aspx fixed the issue. I'm answering my own question because I hope this can help someone else.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM