nicolangelo
04-27-2003, 09:55 AM
I use the following form to search for images or docs
using a two frame page it works fine but if an incorrect
file name is entered I get the 404 default page
which isn't nice at all. How can I get the browser
to show an "error page" or "alert window"?
thank you.
Nico
<SCRIPT LANGUAGE="JAVASCRIPT"><!--
var new_url;
function checkform(filename)
{
if (code=='') {
alert("\type a correct file name");
}
else {
new_url='folder/'+filename+'.jpg';
parent.mainFrame.window.location = new_url;
}
}
//--> </script>
<input type="text" maxlength="15" name="filename" size="10" on submit="checkform(filename.value)">
<input type="button" value="Trova" onClick="checkform(filename.value)" name="button">
using a two frame page it works fine but if an incorrect
file name is entered I get the 404 default page
which isn't nice at all. How can I get the browser
to show an "error page" or "alert window"?
thank you.
Nico
<SCRIPT LANGUAGE="JAVASCRIPT"><!--
var new_url;
function checkform(filename)
{
if (code=='') {
alert("\type a correct file name");
}
else {
new_url='folder/'+filename+'.jpg';
parent.mainFrame.window.location = new_url;
}
}
//--> </script>
<input type="text" maxlength="15" name="filename" size="10" on submit="checkform(filename.value)">
<input type="button" value="Trova" onClick="checkform(filename.value)" name="button">