Title: Clicking on Flags not working &#8211; javascript error
Last modified: August 22, 2016

---

# Clicking on Flags not working – javascript error

 *  Resolved [adamhideseek](https://wordpress.org/support/users/adamhideseek/)
 * (@adamhideseek)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/clicking-on-flags-not-working-javascript-error/)
 * Hi, I am having an issue where clicking on the flags does not trigger the translation.
   I thought it may be similar to issues other people have had, but setting the 
   z-index higher than anything else on the site did not fix the issue.
 * In my chrome inspector, I get the following error:
 * Uncaught ReferenceError: doGoogleLanguageTranslator is not defined
 * Also: XMLHttpRequest cannot load [https://translate.googleapis.com/translate_static/css/translateelement.css](https://translate.googleapis.com/translate_static/css/translateelement.css).
   No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
   Origin ‘[http://idadesal.org&#8217](http://idadesal.org&#8217); is therefore 
   not allowed access.
 * This suggests the onclick javascript is not working – could you please take a
   look at this?
 * [https://wordpress.org/plugins/google-language-translator/](https://wordpress.org/plugins/google-language-translator/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Rob Myrick](https://wordpress.org/support/users/rm2773/)
 * (@rm2773)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/clicking-on-flags-not-working-javascript-error/#post-5395840)
 * Hi adamhideseek,
 * I apologize for the late response. Something tells me that scripts are not being
   loaded on your site, for one reason or another. As a result, the browser is throwing
   errors that it doesn’t recognize plugin functions.
 * The first step would be to check that your theme has the function, `wp_head()`
   located in the `header.php` file.
 * And also I would check and see if `wp_footer()` function is included in your `
   footer.php` file.
 * Those functions are important, as they are responsible for loading all of the
   scripts of any plugins you install. If the functions are not present, the scripts
   never get loaded.
 * Let me know if you want me to look at your site:
 * [http://www.wp-studio.net/submit-ticket/](http://www.wp-studio.net/submit-ticket/)
 * Thanks so much for using the plugin!
 * Rob Myrick
 *  [Rob Myrick](https://wordpress.org/support/users/rm2773/)
 * (@rm2773)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/clicking-on-flags-not-working-javascript-error/#post-5395841)
 * Adam, I just realized we have already solve this issue! My mistake!
 * I’m closing this topic as resolved.
 * Thanks so much for using the plugin!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Clicking on Flags not working – javascript error’ is closed to new replies.

 * ![](https://ps.w.org/google-language-translator/assets/icon-256x256.png?rev=3007649)
 * [Translate WordPress - Google Language Translator](https://wordpress.org/plugins/google-language-translator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-language-translator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-language-translator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-language-translator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-language-translator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-language-translator/reviews/)

## Tags

 * [flag](https://wordpress.org/support/topic-tag/flag/)
 * [flags](https://wordpress.org/support/topic-tag/flags/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 2 replies
 * 2 participants
 * Last reply from: [Rob Myrick](https://wordpress.org/support/users/rm2773/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/clicking-on-flags-not-working-javascript-error/#post-5395841)
 * Status: resolved