Click to See Complete Forum and Search --> : Check for a file using Javascript??


fkn
05-23-2003, 03:20 AM
I need a script that checks for a certain file and makes a redirect based upon the result.

If the file c:\temp\test.txt does not exist then the browser opens another page.

Thanks in advance!

Gollum
05-23-2003, 03:28 AM
Sorry, no can do!

One of the security restrictions of javascript is that it cannot have access to local files. This is to stop malicious scripts from reading private information (e.g. password files, bank details, etc) or writing stuff and damaging the system.

fkn
05-23-2003, 03:42 AM
Ok. Thanks anyway...