mm de esa forma me lo manda igual el formulario y no entra a la funcion..
Código HTML:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script type="text/javascript">
function compruebaCv(archivo) {
if (!archivo) {
alert("Debes subir tu CV para finalizar tu registración")
return false;
}else{
return true;
}
}
</script>
</head>
<body>
<form id="registracion" enctype="multipart/form-data" name="registracion" method="post" action="borrar.php" onsubmit="return compruebaCv(this.form.cv.value);">
<p>
<input name="usuario" type="text" class="campos" id="usuario" size="40" maxlength="16" />
</p>
<p>
<input name="clave" type="password" class="campos" id="clave" size="40" maxlength="16" />
</p>
<p>
<input name="clave2" type="password" class="campos" id="clave2" size="40" maxlength="16" />
</p>
<p>
<input name="cv" type="file" class="campos" id="cv" size="33" />
</p>
<p>
<input type="image" name="imageField" id="imageField" src="/empleos/imagenes/bt-registracion.jpg" />
</p>
</form>
</body>
</html>