You might also consider registering the onchange event for the field.
-scott
On 6/18/07, Marcin Jaworski <mrja...@gmail.com> wrote:
This is possible of course.
You can use setTimeout:
var textField = document.getElementById('YourInputID");
doSomethingWithTextField = function() {
alert(element.value);
setTimeout(doSomethingWithTextField, 10000);
}
or setInterval:
var textField = document.getElementById('YourInputID");
doSomethingWithTextField = function() {
alert(element.value);
}
var timer = setInterval(doSomethingWithTextField, 10000);
The timer variable in the second example is an interval object which
can be used to stop executing interval with clearInterval function:
clearInterval(timer);
On 18 Cze, 14:40, Amin <supe...@gmail.com> wrote:
I'm new to JavaScript and do not really know its capabilities. Suppose I
have a website with a text field in it. I was wondering if it would be
possible to set up a timer and use Google Gears to save whatever is in the
text field every, say, 10 seconds? If someone could tell me if this is
possible and if so, what code would be associated with the timer. Thanks.