Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle transliterate API problem in Firefox
    text
    copied!<p>I am trying to use Google Transliterate API helloWorld in Firefox 4.0.1 and WindowsXP</p> <p>I am using node.js 0.4.7 to serve the page</p> <p>When I load the page through node.js, i get the following error: "attempt to run compile-and-go script on a cleared scope"</p> <p>The page is rendered successfully if I double-click it and open in Firefox from disk, or if I open it in IE8, Opera or Chrome</p> <p>Any idea why this happens and what is the way around it? Here is the code:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"/&gt; &lt;script type="text/javascript" src="https://www.google.com/jsapi?api-key-here"&gt; &lt;/script&gt; &lt;script type="text/javascript"&gt; // Load the Google Transliterate API google.load("elements", "1", { packages: "transliteration" }); function onLoad() { var options = { sourceLanguage: google.elements.transliteration.LanguageCode.ENGLISH, destinationLanguage: [google.elements.transliteration.LanguageCode.URDU], shortcutKey: 'ctrl+g', transliterationEnabled: true }; // Create an instance on TransliterationControl with the required // options. var control = new google.elements.transliteration.TransliterationControl(options); // Enable transliteration in the textbox with id // 'transliterateTextarea'. control.makeTransliteratable(['transliterateTextarea']); } google.setOnLoadCallback(onLoad); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; Type in Urdu (Press Ctrl+g to toggle between English and Urdu)&lt;br&gt; &lt;textarea id="transliterateTextarea" style="width:600px;height:200px"&gt;&lt;/textarea&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload