mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-01 03:24:43 +00:00
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@686 e7d03fd6-7b0d-0410-9947-9c21f3af8025
30 lines
No EOL
724 B
Text
30 lines
No EOL
724 B
Text
- better CGI scripts
|
|
<form onsubmit=return(isRequired(document.checklinkForm)) name=checklinkForm ...>
|
|
</form>
|
|
|
|
//Check for the required fields
|
|
function isRequired(thisForm)
|
|
{
|
|
|
|
var empty = false;
|
|
|
|
// URI
|
|
if ( (isEmpty(thisForm.uri)) ||
|
|
(thisForm.uri.value == "http://") )
|
|
{
|
|
alert("The URL field is required. Please fill it in.");
|
|
thisForm.uri.select();
|
|
thisForm.uri.focus();
|
|
empty = true;
|
|
}
|
|
// verify URL format
|
|
if ( (empty == false) &&
|
|
( verifyURI(thisForm.uri) == false) )
|
|
{
|
|
alert("Invalid URL submitted. Please submit a valid UH URL.")
|
|
thisForm.uri.select();
|
|
thisForm.uri.focus();
|
|
empty = true;
|
|
}
|
|
return (!(empty));
|
|
} |