It's virtually impossible to debug code pasted directly into the group because Groups often trashes the formatting and such, wrapping lines and more. Please provide a link to the page that's having trouble or - if that is absolutely impossible - a pastebin of your code.
Jeremy R. Geerdes Generally Cool Guy Des Moines, IA For more information or a project quote: [email protected] If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! On Feb 2, 2012, at 8:32 AM, Rik wrote: > This standard translate API V2 script (from http://code.google.com/apis) > isn't working. > Please could anybody body tell what's wrong, thanks a lot! > > <html> > <head> > <title>Translate API Example</title> > </head> > <body> > <div id="sourceText">Hello world, how are you?</div> > <div id="translation"></div> > <script> > function translateText(response) { > document.getElementById("translation").innerHTML += "<br>" + > response.data.translations[0].translatedText; > } > </script> > <script> > var newScript = document.createElement('script'); > newScript.type = 'text/javascript'; > var sourceText = > escape(document.getElementById("sourceText").innerHTML); > var source = 'https://www.googleapis.com/language/translate/v2? > key={API ID}&source=en&target=de&callback=translateText&q=' + > sourceText; > newScript.src = source; > > document.getElementsByTagName('head')[0].appendChild(newScript); > </script> > </body> > </html> > > -- > You received this message because you are subscribed to the Google > Groups "Google AJAX APIs" group. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > To view this message on the web, visit > http://groups.google.com/group/google-ajax-search-api?hl=en_US > For more options, visit this group at > http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en -- You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] To view this message on the web, visit http://groups.google.com/group/google-ajax-search-api?hl=en_US For more options, visit this group at http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
