1
0
forked from GitHub/gf-core

Change JS translation to replace existing output when a new translation is done.

This commit is contained in:
bjorn
2008-08-15 10:53:59 +00:00
parent 8719bb9530
commit c32be3e827
2 changed files with 15 additions and 5 deletions

View File

@@ -14,7 +14,10 @@
var input = document.getElementById('inputText').value;
var fromLang = document.getElementById('fromLang').value;
var toLang = document.getElementById('toLang').value;
addTranslation('output', grammar.translate(input, fromLang, toLang));
var output = document.getElementById('output');
var translation = grammar.translate(input, fromLang, toLang);
removeChildren(output);
output.appendChild(formatTranslation(translation));
}
function populateLangs () {