15 lines
316 B
JavaScript
15 lines
316 B
JavaScript
|
function validateForm( form, newServer )
|
||
|
{
|
||
|
var errors = new Array();
|
||
|
if ( !form.elements['newServer[Name]'].value )
|
||
|
{
|
||
|
errors[errors.length] = "You must supply a name";
|
||
|
}
|
||
|
if ( errors.length )
|
||
|
{
|
||
|
alert( errors.join( "\n" ) );
|
||
|
return( false );
|
||
|
}
|
||
|
return( true );
|
||
|
}
|