Ver Mensaje Individual
  #6 (permalink)  
Antiguo 27/11/2008, 14:16
Avatar de ZiTAL
ZiTAL
 
Fecha de Ingreso: marzo-2004
Ubicación: Bermio (Bizkaia)
Mensajes: 1.545
Antigüedad: 20 años, 11 meses
Puntos: 62
Respuesta: Consulta...validacion por cada input

Código HTML:
<html>
<head>
<script type="text/javascript" src="validate.js">
</script>
</head>
<body>
      <form action="" onsubmit="return validate()">
	      <input type="submit" value="Borrar" onclick="changeValue(this.value)">
	      <input type="submit" value="Actualizar" onclick="changeValue(this.value)">
      </form>
</body>
</html> 
validate.js
Código PHP:
var publicVar;
function 
changeValue(value)
{
    
publicVar=value;
}
function 
validate()
{
    var 
value;
    if(
publicVar=='Borrar')
    {
        
value a();
    }
    else if(
publicVar=='Actualizar')
    {
        
value b();
    }
    
    return 
value;
}
function 
a()
{
    return 
true;
}
function 
b()
{
    return 
false;

vamos lo que te he dicho antes
__________________
http://zital.no-ip.org
____________________

Euskerie ahuen eta bijotzan