Check if a file exists

Hi,

How can I check if a file exists before trying to open it with:

document.location.href=document.form.user.value+"_"+document.form.password.value+".php3?Param=...";

is there a function like exists() witch returns true or false if a file exists so that I can use the following script on my page:

if(exists(filename.php3)) {
document.location.href="filename.php3?Param=...";
}

Now when a page doesn't exist I get the standard page doesn't exist screen from my provider... I want to generate a message to the user that the password isn't valid...

regards,

Rogier
(the Netherlands)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories