Click to See Complete Forum and Search --> : Whats wrong with this?


aoeguy
10-19-2003, 04:48 AM
<script>
function E404(){
var pageURL=location.href //THIS PAGE
var nfp="http://home.tiscalinet.ch/banditsclan/404.htm" //GoTo
//REDIRECT PAGE
var redir=nfp+"?404="+pageURL
//document.write(redir)
window.setTimeout("location.href=redir,1")
}
</script>


It works when I use the document.write(redir)

gil davis
10-19-2003, 08:55 AM
The correct syntax for setTimeout() is
setTimeout("functionName", timeoutlengthinMS);
So your code should be
window.setTimeout("location.href=redir", 1);

aoeguy
10-19-2003, 08:59 AM
Thanks

In my other post i got help and i fixed the code.
The syntax is useful though