me he equivocado el que dijo que era imposible fue
Heiroon y el mismo te plantea la solución... AJAX:
Código HTML:
<html>
<head>
<script>
function getXMLHttpRequest() {
var xmlHttp;
try {
xmlHttp = new XMLHttpRequest();
} catch(e1) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e2) {
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e3) {
xmlHttp = null;
}
}
}
return xmlHttp;
}
function validar(form) {
var id = form.dato.value;
var xmlHttp = getXMLHttpRequest();
xmlHttp.open("POST", "prueba.php", false);
xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlHttp.send("id="+id);
var r = xmlHttp.responseText;
if(r) {
alert("valor repetido");
return false;
} else {
return true;
}
}
</script>
</head>
<body>
<ul>
<form id="form" action="prueba.php" method="post" onsubmit="return validar(this)">
<input type="text" name="dato">
<input type="submit" value="enviar">
</form>
</body>
</html>
Si no entiendes el código, el mismo
Heiroon te ha dicho por donde empezar, aunque yo también te recomendaría
este manual. SALUDOS.