IE7 and earlier won't run jQuery

  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post December 31st, 2009, 6:56 pm

I've been having this problem for a while. I don't have any ridiculous jQuery, your basic animations and css sets...and yet IE7 and earlier won't run them. It works in IE8, chrome, safari, opera...just about everything BUT IE7 and earlier. Is there some sort of crazy crap going on in IE7 that I don't know about? I'm using the newest release of jquery, 1.3.2. What's the dealio?

You can see the site here: http://com-tech.aims.edu/~mgd141/student2/experiments/voltec/
Use your words like arrows to shoot toward your goal.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 31st, 2009, 6:56 pm

  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post January 1st, 2010, 6:55 am

I'm not seeing it work anywhere. For starters, looks like one of your includes is missing:

Quote:
The requested URL /~mgd141/student2/experiments/voltec/js/function.js was not found on this server.

Index of /~mgd141/student2/experiments/voltec/js
[ICO] Name Last modified Size Description
[DIR] Parent Directory -
[ ] Default_error_400.font.js 28-Dec-2009 19:25 73K
[ ] arialbd_700.font.js 28-Dec-2009 19:24 1.2K
[ ] bold_400.font.js 28-Dec-2009 19:25 15K
[ ] cufon.js 28-Dec-2009 19:25 35K
[ ] custom-form-elements.js 28-Dec-2009 19:25 22
[ ] fonts.js 28-Dec-2009 19:25 110K
[DIR] ie7/ 22-Dec-2009 17:06 -
[ ] jquery.blindToggle.js 28-Dec-2009 19:25 542
[ ] jquery.easing.1.1.js 28-Dec-2009 19:25 8.1K
[ ] jquery.easing.min.js 28-Dec-2009 19:25 2.5K
[ ] jquery.js 28-Dec-2009 19:25 131K


No function.js there. Beyond that, I don't see any actual javascript calls from within the page anywhere, so it makes sense right now that it's not doing anything.
I'd love to change the world, but they won't give me the source code.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post January 1st, 2010, 5:36 pm

okay, I guess that server is screwed up for a while, my college is doing maintanance on it. Check here instead:

http://www.xaetrex.net/vws/voltec/
Use your words like arrows to shoot toward your goal.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post January 5th, 2010, 3:30 pm

I just checked on browsershots to see what browsers won't run this javascript.

Successful
  • FF 3.5
  • FF 3.1
  • FF 3.0
  • FF 2.0
  • FF 0.9
  • Safari 4.0
  • Safari 2.0
  • Opera 10.0
  • Opera 9.8 thru Opera 9.25 (all versions of opera 9)
  • Opera 8.54
  • MSIE 8

Unsuccessful
  • MSIE 7
  • MSIE 6

How is it that every modern browser, and even browsers like FF 0.9 that was released clear back in June of 2004, render these websites accurately, and yet IE 7 cannot? WTF!?!?!?
Use your words like arrows to shoot toward your goal.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post January 6th, 2010, 6:47 am

Finally able to reproduce with IE8 compatibility and have a few minutes, so I'll see what I can find.
I'd love to change the world, but they won't give me the source code.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post January 6th, 2010, 6:55 am

My hunch is that FF works with implied positioning whereas IE needs your positioning defined.

Quote:
Expected identifier, string or number
function.js
Line:78
Code:0
Char:11


That error (from IE) points to the first place animate is called in your code. Basically, for any elements on the page that you want to animate, you need to add CSS position, top, and left to ie.css so that a starting position is properly defined.
I'd love to change the world, but they won't give me the source code.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post January 6th, 2010, 1:07 pm

I went ahead and added "top" to my properties for the "#pointer" selector, which is the first selector that uses the "animate" effect. Now the css looks like this for that selector:

CSS Code: [ Select ]
#pointer {
Here-->  position: relative;
      width: 50px;
      height: 25px;
      margin: -37px auto 0px auto;
      padding: 0px;
      background: url(../images/nav_animate_arrow.png);
Here-->  left: -330px;
Here-->  top: 0px;
}
 
  1. #pointer {
  2. Here-->  position: relative;
  3.       width: 50px;
  4.       height: 25px;
  5.       margin: -37px auto 0px auto;
  6.       padding: 0px;
  7.       background: url(../images/nav_animate_arrow.png);
  8. Here-->  left: -330px;
  9. Here-->  top: 0px;
  10. }
  11.  


Still a no go :(
Use your words like arrows to shoot toward your goal.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post January 6th, 2010, 3:38 pm

I found a SO post to back me up, but that's the only thing I see. Doesn't mean there's not something else there, though. My only remaining suggestion is to try it on all of them just in case the first break in javascript is causing the rest to fail. don't know.
I'd love to change the world, but they won't give me the source code.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post January 6th, 2010, 4:47 pm

I just added "top" and "left" to everything that has a "position" property defined... this sucks. At this point it probably would have taken me less time to build a time machine and destroy IE before it was created then to fix this website
Use your words like arrows to shoot toward your goal.
  • mindfullsilence
  • Professor
  • Professor
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 846
  • Status: Offline

Post January 6th, 2010, 6:06 pm

SUCCESS!!!!!!

This is a snippet of my jquery:

JAVASCRIPT Code: [ Select ]
$('#designbutton').click(function() {
   $('#bodycontentmainlist').stop().animate({
         left : "-2100px", // <-- look here
      }, 800, 'backinout');
});
 
  1. $('#designbutton').click(function() {
  2.    $('#bodycontentmainlist').stop().animate({
  3.          left : "-2100px", // <-- look here
  4.       }, 800, 'backinout');
  5. });
  6.  


Notice that there is a comma after "left : '-2100px' "

I removed this comma and suddenly it works...crazy IE7.

JAVASCRIPT Code: [ Select ]
$('#designbutton').click(function() {
   $('#bodycontentmainlist').stop().animate({
         left : "-2100px" // <-- look here, no comma
      }, 800, 'backinout');
 
  1. $('#designbutton').click(function() {
  2.    $('#bodycontentmainlist').stop().animate({
  3.          left : "-2100px" // <-- look here, no comma
  4.       }, 800, 'backinout');
  5.  
Use your words like arrows to shoot toward your goal.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post January 6th, 2010, 7:17 pm

Well dang, I totally missed that one, too. Should have stuck to my own preachings and read the code backwards. Ah well, at least you can keep any hair you haven't pulled out by now. :)
I'd love to change the world, but they won't give me the source code.

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 104 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.