I would like to get the code where " when you are typing in a text box ,another display box automatically displays the text that is being typed simultaneously". Eg :- If i am typing America -As i type "A" in the 'text box' the 'display box' should display "A".Then as i type m after A ,the display box will show " Am" (original word and second word).Now as i type e after Am in the text box the display box should show "Ame". I hope i am making it clear. How do we do that. Please suggest.
This is done via javascript not php <script type="text/javascript"> function copyText() { document.getElementById('displayarea').innerHTML = document.getElementById('text').value; } </script> <textarea id="text" style="width: 300px; height: 100px" onKeyUp="copyText();"></textarea> <div id="displayarea" style="width: 300px; height: 100px; border: 1px solid #000;"></div> Code (markup):