View Full Version : How can JS check if a file exists?
12-16-2004, 07:49 PM
12-16-2004, 08:00 PM
12-17-2004, 02: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, 02:23 PM
Please try the following script:
var fso = new ActiveXObject("Scripting.FileSystemObject");
// file exists
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.