Posts: 9
Name: Rohan Shenoy
Location: Thane-Vashi,Mumbai,India
|
Yes, checking links is possible if you have the following:
1. Custom error pages: Directions to create custom error pages can be found at http://en.wikipedia.org/wiki/Custom_error_page and http://www.outfront.net/tutorials_02...tomerrors1.htm
2. Opera browser, would be more productive that Internet Explorer or Firefox because IE asks for confirmation every time a page tries to close itself.
What to do: In custom error page, add the below code to close the window automatically.
Code:
<script>
window.close()
</script>
Now paste the below code in a blank text file and save it as .html file.
Now open that html file in your browser and start checking links.
Code:
<html>
<head>
<script>
function check()
{
webAdd=prompt("Enter url here in given format: www.google.com","www.google.com")
{
window.open("http://"+webAdd+"")
}
}
</script>
</head>
<body>
<input type="button" value="Check URL" onclick="check()">
</body>
</html>
If you are going to use it on localhost, you can customize the webAdd that way so that you will need to enter only the file name at prompt box.
Rationale behind this trick:
If file exists > Fill will load
If file does not exist > Custom error page loads > Custom error page closes due to inserted javascript code > User returns to the window in which he was previously there(i.e,-URL checking page)
So If you return to the file checking page, it means file does not exist.
__________________
Medical entrance resources for MHT-CET: Please login or register to view this content. Registration is FREE
My javascript showcase: Please login or register to view this content. Registration is FREE
Last edited by rohan_india; 11-07-2007 at 01:06 AM..
Reason: add a missing point
|