Problems with setTimeout() [Javascript]
Posted: Thu May 10, 2007 4:42 am
Im trying to set a timer on my ajax request so the server isn't overloaded, but having trouble actually getting the timer to work...
i use, onkeyup="timer(this)" on a text input field, but no request is sent/received from the server.
The sendReq() function..
Any help would be much appreciated.
i use, onkeyup="timer(this)" on a text input field, but no request is sent/received from the server.
Code: Select all
function timer(obj) {
window.setTimeout("sendReq("+obj.value+", "+obj.id+", "+obj.id+"_valid)", 500);
}
Code: Select all
function sendReq(str, objId, responseId)