auriaks
03-11-2010, 10:01 PM
Hi,
I have a function doWork() which I want to trigger automatically in every 3 seconds. Now, I use
<input type="text" onkeyup="doWork();" name="inputText" id="inputText" />
but I don't want to push the button or write a letter every time. I need it to work automatically...
function doWork(){
httpObject = getHTTPObject();
if (httpObject != null) {
httpObject.open("GET", "middle_content.php", true);
httpObject.send(null);
httpObject.onreadystatechange = setOutput;
}
}
Thanks
I have a function doWork() which I want to trigger automatically in every 3 seconds. Now, I use
<input type="text" onkeyup="doWork();" name="inputText" id="inputText" />
but I don't want to push the button or write a letter every time. I need it to work automatically...
function doWork(){
httpObject = getHTTPObject();
if (httpObject != null) {
httpObject.open("GET", "middle_content.php", true);
httpObject.send(null);
httpObject.onreadystatechange = setOutput;
}
}
Thanks