Criei este código. Fiz algumas modificações, para melhor funcionamento:
<html>
<head><script language="JavaScript">
<!--
function valida(form) {
var titulo=document.form.txttitulo.value;
var link=document.form.txtlink.value;
var desc=document.form.txtdescricao.value;
if (titulo=="") {
alert("O campo TÍTULO está vazio.");
document.form.txttitulo.focus();
return false;
}
if (link=="") {
alert("O campo LINK está vazio.");
document.form.txtlink.focus();
return false;
}
if (link=="http://") {
alert("A URL não é válida.");
document.form.txtlink.focus();
return false;
}
if (desc=="") {
alert("Falta a descrição.");
document.form.txtdescricao.focus();
return false;
}
return true;
document.form.submit();
}
//-->
</script>
<title>Página</title>
</head>
<body>
<form method="post" action="acao_inserir.asp" name="form" onsubmit="return valida();">
<table width="39%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>Título:</td>
<td><input type="text" name="txttitulo"></td>
</tr>
<tr>
<td><p>Link:</p></td>
<td><input name="txtlink" type="text" size="60" value="http://"></td>
</tr>
<tr>
<td>Descrição:</td>
<td><textarea name="txtdescricao" cols="30" rows="5"></textarea></td>
</tr>
<tr>
<td><input type="submit" name="inserir" value="Inserir"></td>
<td><input type="reset" name="limpar" value="Limpar"></td>
</tr>
</table>
</form>
</body>
</html>