MyBB Community Forums

Full Version: Shoutbox IE7 Fix - Works
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I installed almost every shoutbox known to MyBB and none of them would work in IE7 (or below) .
I kept getting the Loading ... sign yet in other browsers or IE8 it worked fine .
So got bored tonight and chucked IE8 in compatability mode
to see if it had fixed itself ( <-- lol ) and then thought I might do some investigating .
First off I checked the browser bar which said :-

! Done with errors ( see attached pic )
[attachment=18768]

So I clicked on this and it opened the error box
[attachment=18767]

Now the first error normally ( not always ) fixes the rest if you can fix the first error .
So I did some googling and came across someone who found out the whole reason they were getting the error

----- Message: Expected identifier, string or number

Was a comma ...One stupid little comma crashes this in internet exploder
( I could not believe it )
Anyway to the fix

I opened myshoutbox.js ( in the jscript folder in my webroot directory ) it was around line 445
The error stated in the error box in IE was :-

Message: Expected identifier, string or number
Line: 445
Char: 1
Code: 0
URI: http://forum. XXXXXX .com/jscripts/myshoutbox.js?ver=121

( the error box said it was line 445 but the comma was actually on line 443 )

The code in this area said

		var textbox = $("shout_data");
		textbox.focus();
		textbox.value += element.alt;
	},
	
};

so alls i did was changed it to
		var textbox = $("shout_data");
		textbox.focus();
		textbox.value += element.alt;
	}
	
};

Notice the comma has been deleted above the closing bracket

And hey presto , Shoutbox works in IE ( compatibility view )

So If someone running IE7 or less could test this
( as i dont have access to IE7 ) that would be great
But it definitely went from being broke to fixed in comp view
on my test site and my live site
Hope this helps someone out and KUDO's to Gabriel Harper for the fix
found here :- http://www.gabrielharper.com/2009/04/exp...or-number/