Welcome to WebmasterWorld Guest from 54.160.221.82

Forum Moderators: open

Message Too Old, No Replies

"object expected"

glitch in simple script

     
10:23 am on May 31, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:July 4, 2007
posts:112
votes: 0


getting "objecrt expected" from IE...can't spot problem:

function swap() {
$('#back').fadeOut('600', function(){
window.location.href='ahb.htm'}
);
}

jQuery's properly linked.
3:48 pm on May 31, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


does this make it go away?


function swap() {
if ($('#back').length) {
$('#back').fadeOut('600', function(){
window.location.href='ahb.htm'}
);
}
}


Though I have no sound evidence, perhaps "back" is a reserved word, but doesn't seem like it would be.
4:10 am on June 1, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:July 4, 2007
posts:112
votes: 0


does this make it go away?

nope

I'll break it into bits and try some other browsers

cheers
3:56 am on June 2, 2011 (gmt 0)

Junior Member

5+ Year Member

joined:July 4, 2007
posts:112
votes: 0


"jQuery's properly linked"

it wasn't: wrong version.