html - Google translate breaks button that makes javascript function call - Stack Overflow

I have site that works fine but when i put it through Google translate my button that initiates a javas

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

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

Share Improve this question edited Feb 14, 2009 at 18:43 Abs asked Feb 14, 2009 at 18:17 AbsAbs 58k103 gold badges282 silver badges418 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 6

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.

In order to avoid the translation of elements which should execute JavaScript you can give them a class of notranslate: class=”notranslate”. That should let google ignore these elements.

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?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744850408a4597091.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信