Hi - I've searched and searched without success.

I have a legacy Perl search application.
Although my database content is only in Englishm I want to use the API
so that the word gets translated on the fly, and searches the
translated word in order to return English results.
Like this :

User types in search for : acier
API translates to : steel
My perl function searches for : steel  ........... and returns the
results.

Why is this not working (the $title is being passed successfully) :

  google.language.translate("$title", "fr", "en", function(result) {
   if (!result.error) {
          var sendToPerl;
 
document.getElementById("sendToPerl").value=result.translation;
  }

NOW PERL BEGINS :
this returns empty :
  <input type="hidden" id="sendToPerl" value="$sendToPerl">
so does this :
  document.write('<input type="text" name="sendToPerl" value="' +
sendToPerl + '">');

Altho FireFox does populate the text box with :
[object HTMLInputElement]

THANKS - Syl



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX API" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to