Best Download Sites Login
Site Login

Page Extension Types

Description
Displays a message based on the extension (like .html) of the web page. And, it's a breeze to add more file types to the script....View A Script Demo


Do you find it confusing setting up these script?
Java Scripts Magic can do all the hard work for you all At The Touch Of A Button.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="TextPad 4.4">
<LINK href="general.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
URL = window.location.href;
ishtm = (URL.indexOf('.htm') > -1); // true if URL contains .htm
ishtml = (URL.indexOf('.html') > -1);
isshtml = (URL.indexOf('.shtml') > -1);
isphtml = (URL.indexOf('.phtml') > -1);
//  End -->
</script>
</HEAD>

<BODY Background=../graphics/grayback.jpg>
<center><BR><BR><BR>
<SCRIPT LANGUAGE="JavaScript">
if (isphtml) {
document.write("This is a .phtml file!");
}
else if (isshtml) {
document.write("This is a .shtml file!");
}
else if (ishtml) {
document.write("This is a .html file!");
}
else if (ishtm) {

document.write("This is a .htm file!");
// Include the generic .htm last because if tested
// first, it would be true for all the file types above

}
else { // It is something else....
document.write("This file is of an unknown type.");
}
</script>

</center>
</BODY>
</HTML>
 

Business Proposal If you have a Business Proposal that you think may be of interest to us here at Best Download Sites please contact us to discuss the matter in further detail