By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

javascript error object expected

P: 10
I have below javascript to show loading image until page loads which gives error in internet explorer 9, on chrome it works fine.
error is
javascript runtime error object expected
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
  2. <script type="text/javascript">
  3.     $(window).load(function () {
  4.         $("#pageloaddiv").fadeOut(2000);
  5.     });
  6. </script>
  7.  
Whats wrong
please help
Jul 15 '14 #1
Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
put that just before the (closing) </body> tag:
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.         $("#pageloaddiv").fadeOut(2000);
  3. </script>
Jul 15 '14 #2

P: 10
thanks for reply but it still gives the same error
Jul 15 '14 #3

Dormilich
Expert Mod 5K+
P: 8,639
you obviously need to load the jQuery library before that.
Jul 15 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.