error when adding Google translate script in a html block
Permalink
If i add this google translate script in a html block (directly copied from google, and use it before on my page i make in clean html in dreamweawer, and its function):
<div id="google_translate_element">
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'no', includedLanguages: 'da,es,de,el,en,fa,fr,hi,it,iw,ja,nl,pl,pt,ru,sq,sr,sv,th,tr,zh-CN', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
All the html blocks cannot be edidet after insert the script. I must delete the page. I cant even delete only that html block. BUT... its only after adding the last part of the script. This : <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> That the script scrue up all my html blocks and they cant be edited. What s wrong...??
The same actualle happend if i add other script directly to a html block. Like visual lightbox that need a script in the body.
<div id="google_translate_element">
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'no', includedLanguages: 'da,es,de,el,en,fa,fr,hi,it,iw,ja,nl,pl,pt,ru,sq,sr,sv,th,tr,zh-CN', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
All the html blocks cannot be edidet after insert the script. I must delete the page. I cant even delete only that html block. BUT... its only after adding the last part of the script. This : <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> That the script scrue up all my html blocks and they cant be edited. What s wrong...??
The same actualle happend if i add other script directly to a html block. Like visual lightbox that need a script in the body.
can you add the javascripts to the page by using the extra header content attribute and then add only the divs in your html block?