Click to See Complete Forum and Search --> : writing to document


scubadvr2
08-05-2005, 04:49 PM
Hi guys. Now i've always been able to do the basic javascript stuff.. Such as events etc. But this one I'm a little stumped and I can't find a tutorial. My problem is I'm trying to create a form where when OnKeyDown is activated it will insert whatever was in that text box to somewhere on the screen.
For example, You have the sentence, 'Hello, !' and when they type their name in the input field, it will fill the space in with their name. Get it? How could I do that without disturbing the rest of the page? Would I use document.write? If necessary I could use an iFrame or a window.. I just need something that works.

Thanks!

A1ien51
08-05-2005, 05:13 PM
<input type="text" name="t1" onkeyup="document.getElementById('theId').innerHTML=this.value;">
<div id="theId"></div>

somethign like that should get you started.

Eric

scubadvr2
08-05-2005, 06:24 PM
Thanks! I knew it was something like that!