Wednesday, April 6, 2011

Google translate breaks button that makes javascript function call

Hello all,

I have site that works fine but when i put it through Google translate my button that initiates a javascript function doesn't work.

However, some other Javascript calls via links work. Whats wrong?

Example translation

Thank you for any help.

Update

The sister site is even worse, the whole left side goes white?? Wait for it to fully load.

Example site 2

From stackoverflow
  • Could be any number of things I would have thought.

    Could be that Google changes the DOM on the page that break the way your script interacts with it. Are there any JavaScript errors on the page?

    Abs : No errors at all.
  • I think it's because when you use Google Translate, you're actually getting the page from Google's domain not your own. Your page then tries to make an AJAX request to your domain, which is now cross-domain, therefore blocked for security.

    Abs : I think you are right on this occasion but even stranger, the sister site has a complete blank left handside.Updated my question with this.
    Greg : I can't really see anything wrong with the second site - what browser are you in? I did get a lot of whitespace on the left once in IE, but that was without using translate, so it could be an issue with the site, not translate
    Abs : OMG - what version of IE? I am using Firefox 2.
    Greg : IE8. Seems OK in Firefox 3
    Abs : Ok, I will check my site out more. I have not tried IE8!

0 comments:

Post a Comment