If the html element is undefined, then it has either not been created
or it is out of scope. Try making it global (e.g., window.el =
document.getElementById('...'); ) to see if that helps. Also, when
using the translate method, you provide a function that will be called
when the translation is complete. If you have something that is
dependent on that translation, you'll need to call it from this
callback function to guarantee that the translation has returned.
Jeremy R. Geerdes
Effective website design & development
Des Moines, IA
For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]
Unless otherwise noted, any price quotes contained within this
communication are given in US dollars.
If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!
And check out my blog, Adventures in Web Development, at
http://jgeerdes.blogspot.com
!
On Sep 21, 2009, at 12:16 AM, [email protected] wrote:
>
> Hello,everyone,
> I want to use the translation for the my search engin, and I
> stored the sentence translation using google translator api in an html
> tag, but I dont know when the translation is totally returned , and
> then I can use the
> translation to search. So, when I use 'getElementById' to get the
> translation from the html tag, I get the "undefined", not the real
> translation.
> I dont know whether I described clearly . I will add more info if
> anyone is puzzled.
> Thanks very much.
> >
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en
-~----------~----~----~----~------~----~------~--~---