View Full Version : How can JS check if a file exists?
12-16-2004, 06:49 PM
12-16-2004, 07:00 PM
12-17-2004, 01:42 AM
Yes, through XMLHTTP object. Something similar to this (http://www.codingforums.com/showthread.php?t=14463), you just need to check if the HTTP status is 404 or not. But server-side solution might be more appropriate for your situation.
12-17-2004, 01:23 PM
Please try the following script:
var fso = new ActiveXObject("Scripting.FileSystemObject");
// file exists
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.