Yes, I Googled, but I didn't find an entry to this specific
problem in the first couple of result pages.
I've been using the following script to validate form entry.
Some nefarious individuals have figured out a way to submit the
form by entering spaces in the required text fields (imagine
that!). Is there any way to plug up this hole that ain't
browser-specific?
TIA
Neill
function CheckForm ()
{
var errorMsg = "";
if (document.frmMe ssage.name.valu e == '')
{
errorMsg += "\n\tName \t- Enter your Name";
}
if (document.frmMe ssage.message.v alue == '')
{
errorMsg += "\n\tMessag e \t\t- Enter a message";
}
if (errorMsg != ""){
msg =
"______________ _______________ _______________ _______________ ___\n\n";
msg += "Your message has not been sent because there are
problem(s) with the form.\n";
msg += "Please correct the problem(s) and re-submit the form.\n";
msg +=
"______________ _______________ _______________ _______________ ___\n\n";
msg += "The following field(s) need to be corrected: -\n";
errorMsg += alert(msg + errorMsg + "\n\n");
return false;
}
return true;
}
--
Wayfarer
Journeys: http://www.journeys.ws/
There is a difference between knowing the path and walking the
path. - Morpheus
problem in the first couple of result pages.
I've been using the following script to validate form entry.
Some nefarious individuals have figured out a way to submit the
form by entering spaces in the required text fields (imagine
that!). Is there any way to plug up this hole that ain't
browser-specific?
TIA
Neill
function CheckForm ()
{
var errorMsg = "";
if (document.frmMe ssage.name.valu e == '')
{
errorMsg += "\n\tName \t- Enter your Name";
}
if (document.frmMe ssage.message.v alue == '')
{
errorMsg += "\n\tMessag e \t\t- Enter a message";
}
if (errorMsg != ""){
msg =
"______________ _______________ _______________ _______________ ___\n\n";
msg += "Your message has not been sent because there are
problem(s) with the form.\n";
msg += "Please correct the problem(s) and re-submit the form.\n";
msg +=
"______________ _______________ _______________ _______________ ___\n\n";
msg += "The following field(s) need to be corrected: -\n";
errorMsg += alert(msg + errorMsg + "\n\n");
return false;
}
return true;
}
--
Wayfarer
Journeys: http://www.journeys.ws/
There is a difference between knowing the path and walking the
path. - Morpheus
Comment