[thelist] JAVASCRIPT: realtime update of input fields in a form

Chris W. Parker cparker at swatgear.com
Wed Jul 3 15:32:01 CDT 2002

> -----Original Message-----
> From: Ismail KIRTILLI [mailto:listeler at ismailk.net]
> one thing I have discovered with the curent script is that it doesn't
> automatically refresh the preview part when you make a change
> with pre-changed
> part.
> For example, you write something bold, then you wanted to
> change it italic.
> Simply it doesn't refresh the field, it just prints the newly
> additions.
> did you realize that?

what i've encountered is that the "preview" is not updated until you add
a character or change a character. for example if you paste a string
into the input box, the preview will not be displayed until you add a
character, or at the least press the space bar.

that could be what tom was talking about when he said...

Now, the setTimeout probably is not a good idea - I think if you
change it to setInterval (and assign it to a variable) you will be
using the correct method. Have it check at intervals of a couple
seconds or whatever you want, and when the page submits clear the
interval for clean up.

but i'm not sure but i'll have to figure out what he means later since
i've just been playing around with the current implementation of it.


More information about the thelist mailing list