Mystery Google Translate Error in IE8
Using the Google Translate script: http://translate.google.com/translate_tools
On SOME PCs running IE8 I get an error "Element not found." Line 183 Char 183.
Those PCs that get the error always have the error.
Those that don't get the error they load the translate guy perfect e开发者_如何转开发very time.In fact, I have two computers here both on IE8 version 8.0.600.... One loads the translator and one does not.
http://creative.figleaf.com/sandbox/google_translate_test.html
Does anyone know why this is happening? or how to work around the error?
Thanks
Any time I see two copies of the same version of IE behaving differently, I immediately suspect Compatibility mode.
My guess is that one of those IE8s is actually pretending to be IE7, by running IE7-compatibility-mode. (probably its the one which is throwing the error)
To find out if my guess is right, press F12 to bring up the dev tools window, and look at the top right corner of this window. There you should see the browser mode. If one of them says "IE7" or "Compatiblity mode", then you've found the problem.
I see the same issue, works on IE8 for one PC, but not on IE8 for another PC. Using Developer Tools JScript Debugger in IE, the "code" breaks on the following block of code:
if(d=!o.external||!o.external.googleToolbarVersion||fa(o.external.googleToolbarVersion)<6.2)
In the JScript Debugger, I was able to add a watch to o.external, but adding a watch to o.external.googleToolbarVersion crashes the debugger. So I am guessing the googleToolbarVersion property is not working for some reason.
Hope this helps.
I have hit odd ie only, hard to dupe issues, usually they wind up beings a combo of windows version/browser version/service pack combo and almost always involve js. Do the machines have anything in common in those regards i.e. are they all Vista?
In the example of the 2 with the same browser, are there any noticeable differences in the windows systems tab?
You can't control everyone's computer - for example, if they have JS turned off it won't work anyway.
for IE8, (anchor tags) will cause google translate to fail with "element not found" in element_main.js. Adding a "notranslate" class to anchor tags should resolve this.
精彩评论