validar submit con jquery!

Iniciado por 01munrra, 9 Octubre 2012, 22:40 PM

0 Miembros y 1 Visitante están viendo este tema.

01munrra

saludos!,,,

como podria hacer para validar un form, que me valide si estan vacios me mande un mensaje, y si estan llenos me mande un mensaje tipo 'verify':true, en caso de presionar "SI" me registre, en caso de "NO" se mantenga en la vista....

he hecho mi parte pero no me funciona,,,, aqui lo que hice:

Código (php) [Seleccionar]

$j("#form").submit(function(evento)
{   

                                                        var input = $j("#valor").val();

if( input == "" || input == NULL || input == "  " )
{
apprise("<b>Lo Sentimos</b>, llene correctamente el formulario");
return false;
}
if( $valor )
{
apprise('¿Desea enviar los registros?',
{'verify':true}, function(r)
  {
if(r)
{ form.submit(); }

  }
   );        
}
});


este codigo, no me esta funcionando....que estoy haciendo mal???