3D FlipBook - TypeError: _this.wnd is null

m***a@disgrafic.com
2023-03-14
2023-03-16

Hello, It's the first time I'm using 3D flipbook and i constantly get this error: TypeError: _this.wnd is null. How can I solve it?

Replies

a***r@3dflipbook.net
2023-03-14
2023-03-14

Hi, could you write a link to any page where you getting such error?

m***a@disgrafic.com
2023-03-15
2023-03-15
a***r@3dflipbook.net
2023-03-16
2023-03-16

Try to create the book from document ready function:

jQuery(function() {
  jQuery('body').FlipBook(...);
});
m***a@disgrafic.com
2023-03-17
2023-03-17

Done, it still shows the same error.

a***r@3dflipbook.net
2023-03-17
2023-03-17

Problem goes from this script: https://ndoki.org/Portals/_default/skins/wcs_ndoki/js/main.min.js?v=00.00.12 , if you exclude it from the page, it will work.

Tricks like $("#Form").appendTo("#mainform"); does not work for iframes.

a***r@3dflipbook.net
2023-03-17
2023-03-17

In your case you need to create book only after that trick in main.min.js, something like:

 $( document ).ready(function() {
     setTimeout(function() {
         $('.sample-container').FlipBook({
             pdf: "FoxitPdfSdk.pdf",
             template: {
                 html: 'templates/default-book-view.html',
                 links: [{
                     rel: 'stylesheet',
                     href: 'css/font-awesome.min.css'
                 }],
                 styles: [
                     'css/short-black-book-view.css'
                 ],
                 script: 'js/default-book-view.js'
             },
         });
     }, 1000);
 });

You need to create your own document ready event that fires after the trick and use it for creating iframes containing objects.

m***a@disgrafic.com
2023-03-20
2023-03-20

Solved. Thank You for the Help!

Log In to leave a comment