Jump to content

Error with the statistics module because windows.load


ElieK

Recommended Posts

Hello,
I got a problem quite weird which seems only occured on the first page index.php of my shope

Basically Firefox and IE see an error, which not look serious in an e commerce website.
The error is :

Error : $(window).load is not a function
Source File : http://www.mywebsite.com/index.php
Line : 792



ANd in the line792, I got that which seem come from the stats module :
[removed]
           var time_start;
          [b] $(window).load([/b]
               function() {
                   time_start = new Date();
               }
           );
           $(window).unload(
               function() {
                   var time_end = new Date();
                   var pagetime = new Object;
                   pagetime.type = "pagetime";
                   pagetime.token = "mIgbUJL662Q=irhz/YvP2AA=CwEWc4jodAw=QYqjo6GpueE=";
                   pagetime.time = time_end-time_start;
                   $.post("http://www.mywebsite.com/statistics.php", pagetime);
               }
           );
       [removed]



I heard lot of problems with windows.load, anybody can help me to figure this out ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...