The majority of forums are now only available as archives, which means posting/editing is disabled.

The Anything and Everything forum is still open.
Time: 2015-10-09, 07:59am
I think it was done with java, but...
Subject: I think it was done with java, but...  ·  Posted: 2003-04-08, 07:28am
Rank: ? (3)
Member #: 3874
I saw this site once that had a text area-like box that typed text into the box on it's own, one letter at a time. It would just type away, and it started as soon as the page loaded. Does anyone know what I am talking about? If so, do you know how to do it?

  Reply to this ·  Post link ·  Top
Subject: javascript can do it  ·  Posted: 2003-04-08, 07:59am
Rank: ? (4827)
Member #: 3416
if i understand you correctly, you can use javascript to do it. the only thing i don't know is how to make it go slow, but here's some code:

  1. <form name="theform">
  2.   <input name="typing" />
  3. </form>

that will give you a text box named typing inside a form named theform.
you would then want to make a javascript function and put it in the head:

  1. function typethetext() {
  2.   textstring = "this is the text it will type";
  3.   var i;
  4.   for (i = 0; i < textstring.length; i++) {
  5.     document.theform.typing.value = textstring.substring(0, i + 1);
  6.     //code to make it delay before adding the next character
  7.   }
  8. }

then just call the function from somewhere in the body:

  1. <script type="text/javascript"><!--
  2.   typethetext();
  3. //--></script>

hope that helps! i have a javascript that changes the values of form fields on this page of my site.

my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.