View Single Post
Old 11-09-2012, 03:05 PM   PM User | #15
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
ah, I get it now. thanks for explaining.

can I ask what the purpose of the other iframe is? it seems to want to translate to English? But if the input language is English what is the idea? and why not fire the function on the onkeyup of the textarea the way you do with the first iframe?

also, this is going to cause you problems:
Code:
<body onhaschange="translateIt(document.body.innerText)">
there is, sadly, I believe, no body onhaschange event, and the equivalent is hard to implement in a cross-browser fashion.

innerText will get you into trouble, too. innerText is IE only. textContent is more widely accepted, but IE only started recognising it at IE9+

if you are only looking to translate the text from the textarea, it is much easier just to be getting the value of that textarea, the same as you are doing now.
xelawho is offline   Reply With Quote