Here's my issue. I have this function to test proxy servers.
function crawl() {
var oldstatus = document.getElementById('status').innerHTML;
document.getElementById('status').innerHTML = oldstatus + "Crawler Started...<br />";
var url = document.getElementById('url').value;
var proxys = document.getElementById('proxys').value.replace(/\n/g,',');
var proxys = proxys.split(",");
for (proxy in proxys) {
var proxytimeout = proxy*10000;
setTimeout(doRequest(url,proxys[proxy]), proxytimeout);
}
}
I want the 'doRequest()' function to be called in roughly 10 second intervals but even with the setTimeout() the functions are called immediately.
Any ideas are welcome, thanks.
PS: Even if I put an arbitrary value for 'proxytimout' it has no effect.