Click here to Skip to main content
15,886,258 members

Comments by markohack (Top 11 by date)

markohack 28-Dec-12 16:01pm View    
Thanks,but it ,not what i mean.
markohack 28-Dec-12 15:35pm View    
Deleted
I have this script for google translation it worked good,but it not translate only if i enter value in source code ,please you can fix it?

<html>
<head>
<title>Translate</title>
</head>
<textarea rows="4" cols="50" id="sourceText" >hi
</textarea>
<textarea rows="4" cols="50" id="translation">
</textarea>
<input name="send" type="button" önClick=" var send = 'https://www.googleapis.com/language/translate/v2?key=api&source=en&target=iw&callback=translateText&q=' + sourceText;
newScript.src = send;" value="translate">
<script>
function translateText(response) {
document.getElementById("translation").textContent += "" + response.data.translations[0].translatedText;
}
</script>
<script>
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
var sourceText = escape(document.getElementById("sourceText").value);
// WARNING: be aware that YOUR-API-KEY inside html is viewable by all your users.
// Restrict your key to designated domains or use a proxy to hide your key
// to avoid misuage by other party.


// When we add this script to the head, the request is sent off.
document.getElementsByTagName('textarea')[0].appendChild(newScript);
</script>
</body>
</html>
markohack 28-Dec-12 15:10pm View    
exactly.
markohack 28-Dec-12 14:57pm View    
Deleted
when user enter any text in textbox the value of textbox must be change.how?
markohack 28-Dec-12 14:36pm View    
when user enter any text in textbox the value of textbox must be change.how?