TPG Web Menus
Monday, 19. May 2008, 08:20:08
There's been some discussion on the Opera forums about Opera and web compatibility, which has prompted me to blog this for future reference...
The navigation menus on the TPG web site are nearly unreadable in Opera, but fine in IE, Firefox, etc. More code Opera just can't handle?
Nope.
http://www.tpg.com.au/res/js/stm31a.js
These are old SoThink menus, long since updated by SoThink, but TPG persists in using them.
Line 1010:
The menus are sniffing for "Opera " - note the space. That only appears in the User Agent string when Opera is identifying as Firefox or IE (which works around the problem). For Opera identifying as itself, the space isn't there, which results in the sniffing failing and the script determining that Opera is version 0! Which is too old for the script to handle.
The fix is trivial - delete the space:
I emailed the TPG web master many, many months ago (probably a year or two, now), giving them the exact file name, line number and change to make. Could they find the time to delete a single character? I guess not.
The navigation menus on the TPG web site are nearly unreadable in Opera, but fine in IE, Firefox, etc. More code Opera just can't handle?
Nope.
http://www.tpg.com.au/res/js/stm31a.js
These are old SoThink menus, long since updated by SoThink, but TPG persists in using them.
Line 1010:
nVER=parseFloat(a.substring(a.indexOf("Opera ")+6,a.length));
The menus are sniffing for "Opera " - note the space. That only appears in the User Agent string when Opera is identifying as Firefox or IE (which works around the problem). For Opera identifying as itself, the space isn't there, which results in the sniffing failing and the script determining that Opera is version 0! Which is too old for the script to handle.
The fix is trivial - delete the space:
nVER=parseFloat(a.substring(a.indexOf("Opera")+6,a.length));
I emailed the TPG web master many, many months ago (probably a year or two, now), giving them the exact file name, line number and change to make. Could they find the time to delete a single character? I guess not.










xErath # 19. May 2008, 10:00
Disco Stu # 19. May 2008, 12:00
Shows just how much TPG cares about its customers, really.
Andrew Gregory # 19. May 2008, 12:13