What's wrong with my blog?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

What's wrong with my blog?

Post by JellyFish »

For some reason my blog's javascript is returning an error about jQuery. Why would jQuery be having errors? I didn't write jQuery so I don't think I would know what exactly is going on and why it's only going on in IE. It works fine in other browsers.

Here's all the custom code on my blog:

Code: Select all

<span style="font-style: italic; color: #777;">This post holds CSS styling and javascript that makes my blog so nice! :D</span>
<style type="text/css">body { background: url(http://img151.imageshack.us/img151/7717 ... dowez5.png) no-repeat -35px bottom fixed; } #outer-wrapper { margin-left: 329px;} #header, #sidebar, .Blog { background: url(http://img145.imageshack.us/img145/460/fooyi0.png) repeat-x bottom; border: 1px solid #dedede; margin: 0px; } </style><!--
 
--><div id="iphone" style="background: url(http://img217.imageshack.us/img217/6716 ... 402ep7.png) no-repeat; position: absolute; left: -35px; top: 30px; width: 370px; height: 640px;"></div><!--
 
--><script type="text/javascript" src="http://www.cachefile.net/scripts/jquery/1.2.3/jquery-1.2.3.pack.js"></script><!--
 
--><script type="text/javascript" src="http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js"></script><!--
 
--><script type="text/javascript">var scrollTimeoutID;  window.onscroll = function () {   clearTimeout(scrollTimeoutID);   scrollTimeoutID = setTimeout(function() {    var position = (window.innerHeight+window.scrollY)-640;    var iphone = $("#iphone");    if(position < 30) { position = 30; }    if(position < iphone.css("top").substr(0,iphone.css("top").length-2))    {     iphone.animate({top: position-30},"slow","easeOutQuad").animate({top: position},"slow","easeOutBounce");    }    else    {     iphone.animate({top: position},"slow","easeOutBounce");    }  }, 2000); }</script>
http://how2getafreeiphone.blogspot.com

PS: Please don't read my blog, I find that it can be a little to controversial.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: What's wrong with my blog?

Post by Zoxive »

I didn't get any errors.

Did you find it?
(Ive got firebug & Web developer Running)
Tested on Windows Running Firefox & Ubuntu with Firefox
User avatar
Popcorn
Forum Commoner
Posts: 55
Joined: Fri Feb 21, 2003 5:19 am

Re: What's wrong with my blog?

Post by Popcorn »

while the worst browser for ... well ... anything, doesn't IE still give a line number on which scripts fail? if the little icon on the left of the status bar at the bottom (IE6 anyway) has a yellow "!" or so, (double)clicking should show an almost useless popup with a line number.
just a guess :S
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: What's wrong with my blog?

Post by JellyFish »

Popcorn wrote:while the worst browser for ... well ... anything, doesn't IE still give a line number on which scripts fail? if the little icon on the left of the status bar at the bottom (IE6 anyway) has a yellow "!" or so, (double)clicking should show an almost useless popup with a line number.
just a guess :S
Yes but not that this helps:
Line: 1
Char: 1
error: Invalid argument.
Code: 0
URL: how2getafreeiphone.blogspot.com
Zoxive wrote:I didn't get any errors.
Try opening it up with Internet Explorer.

EDIT: Here's the JavaScript with newline characters:

Code: Select all

 
var scrollTimeoutID;
window.onscroll = function () {
    clearTimeout(scrollTimeoutID);
    scrollTimeoutID = setTimeout(function() {
        var position = (window.innerHeight+window.scrollY)-640;
        var iphone = ($("#iphone") > 30) ? $("#iphone") : 30;
        
        if ( position < iphone.css("top").substr(0,iphone.css("top").length-2) )
        {
            iphone.animate({top: position-30},"slow","easeOutQuad").animate({top: position},"slow","easeOutBounce");
        }
        else
        {
            iphone.animate({top: position},"slow","easeOutBounce");
        }
    }, 2000); 
}
 
Is there any IE bugs that are getting in the way of this code?
Last edited by JellyFish on Fri Feb 15, 2008 3:28 pm, edited 1 time in total.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: What's wrong with my blog?

Post by Luke »

how does that not help? It tells you exactly what and where the problem is.

EDIT: I just checked in IE and I am not seeing the error either. This had BETTER not be another attempt to spam our boards with your free iphone stuff. :evil: :P
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: What's wrong with my blog?

Post by JellyFish »

The Ninja Space Goat wrote:how does that not help? It tells you exactly what and where the problem is.

EDIT: I just checked in IE and I am not seeing the error either. This had BETTER not be another attempt to spam our boards with your free iphone stuff. :evil: :P
I promised this is not spam. I made that clear in the first post("Please don't read my blog..."). Everyone viewing this post please try to focus on my question/problem and not my blog.

I edited my last post with javascript that has multiple lines.

And I don't understand why it would be working on IE on one computer and not on another? Are you sure it's working, is the iphone on the left bouncing around? Both IE7 and IE6 don't work on my computer; that is they don't have the javascript animations working.

EDIT: I found it not to be my code that's having problems but jQuery's code. I have Companion.JS debugger for IE when I look at the error on Companion.JS it says error on line 1 for jQuery. So sense the jQuery I was use is packed, I decided to change it to the unpacked version so that I had multiple lines. And now it say error at line 3000 and something and Companion.JS can't even show that much code at once apparently.

So I don't understand why jQuery would have these errors?
User avatar
Inkyskin
Forum Contributor
Posts: 282
Joined: Mon Nov 19, 2007 10:15 am
Location: UK

Re: What's wrong with my blog?

Post by Inkyskin »

Although I can't test in IE6, I DO get the error in IE7...

http://www.ben-griffiths.com/ie_error.jpg

I'm confused as to what could be causing it though, and why it only happens on certain computers :?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: What's wrong with my blog?

Post by Luke »

often if you make a mistake in your code (code that utilizes jQuery), it will report that there is an error on line x of jquery.js. It' s not because there is a problem in jQuery, it's because you supplied an invalid parameter to a jquery function or something... I dont know if that's what's happening here, but that has happened to me sevaral times.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: What's wrong with my blog?

Post by JellyFish »

Inkyskin wrote:Although I can't test in IE6, I DO get the error in IE7...

http://www.ben-griffiths.com/ie_error.jpg

I'm confused as to what could be causing it though, and why it only happens on certain computers :?
I share the same confusion.
The Ninja Space Goat wrote:often if you make a mistake in your code (code that utilizes jQuery), it will report that there is an error on line x of jquery.js. It' s not because there is a problem in jQuery, it's because you supplied an invalid parameter to a jquery function or something... I dont know if that's what's happening here, but that has happened to me sevaral times.
I think this may be the case. But I don't know what I'm doing wrong with jQuery. Could it be the easing extension?

Code: Select all

$("#iphone").animate({top: position}, "slow", "easeOutBounce");
The third argument could be causing problems in IE; the easing script was probably published before jQuery 1.2.

PS: I don't appreciate the accusation that I'm spamming. I think it's unfair that others can post problems about there blog but I can't because of the blog's topic; it's very selective of you "Luke". I could see if it was inappropriate content, but not just because someone disagrees with it. (I will try not to respond to responses to this.)
Post Reply