framework7

Open full view…

Uncaught TypeError: Cannot read property 'f7View' of undefined

hsyed
Tue, 24 Jun 2014 23:58:06 GMT

I am trying to implement the preloader on my web page. The page works fine in local HTML, but when I put the same code in a JSP web page, I am getting the error - Uncaught TypeError: Cannot read property 'f7View' of undefined

hsyed
Wed, 25 Jun 2014 00:24:57 GMT

This is what I have in my JS file // Initialize your app var myApp = new Framework7(); // Export selectors engine var $$ = Framework7.$; $$('.submitLink').on('click', function () { myApp.showPreloader('Updating ...') setTimeout(function () { myApp.hidePreloader(); }, 2000)});

hsyed
Wed, 25 Jun 2014 00:45:41 GMT

the example from kitchen-sink is working fine on a local HTML, but when I package that into a JSP and deploy the code on the application server the preloader does not appear. On the browser console I am getting this JS exception - Uncaught TypeError: Cannot read property 'f7View' of undefined

Vladimir Kharlampidi
Wed, 25 Jun 2014 16:37:51 GMT

It seems like you have not initialized views or haven't Main view. Do you have such? Can you show your App's HTML structure and JS?

Vladimir Kharlampidi
Wed, 25 Jun 2014 19:21:56 GMT

Or this error also could happen if you try to initialize none existing View