I am trying to code a webpage that does the following:

Listens for user key presses in an input box and dynamically writes them below the input box in a textarea.

Any help?

8 Years
Discussion Span
Last Post by Thirusha

Thank you.
It it clear that I was fixated on the input and did not think of a text area as an input.

I found the following online.
It works in IE but not in FireFox.
Any suggestions on making it work in FireFox?

<script Language="Javascript">
function typewriter(typein) {
    var typeoutObj = document.getElementById('typeout');
    typeout.innerHTML = typein;

Type In Here:

<textarea rows="3" name="typein" onkeyup="typewriter(this.value);"></textarea>
Type Out Here: <textarea id="typeout" readonly></textarea >

Edited by mike_2000_17: Fixed formatting


works for me in FF, i m using FF 3.5.2

it did give one warning, regarding the use of document.getElementById, so i changed the code to this and it still works but this time with no warning:

function typewriter(typein) {
document.getElementById('typeout').innerHTML = typein;

What error are u getting?
Have u tried firebug?


I was not getting an error.
I will check Firebug.
Thanks for the help

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.