2008/5/11 Jörn Zaefferer <[EMAIL PROTECTED]>:
>
>  What exactly are you trying to achieve? Currently the only thing I can
>  provide is a pointer at the example you already found...
>
>  Jörn

So,
i put here my code, and i hope you can tell me what i did wrong.

form:

<form id="probaform" method="post" action="action.php">
<legend>Teszt form</legend>
a:<input type="text" name="nev" id="nev"><br>
b:<input type="text" name="utonev" id="utonev"><br>
c:<input type="text" name="email" id="email"><br>
<input type="submit" id="submit">
</form>

  $('#probaform').validate({
    rules:{
      nev:"required",
      utonev:"required",
        email:{
          required: true,
          minLegth:3,
          }
        },
    messages:{
      nev:"Adjad meg a nevedet!",
      utonev:"Adjad meg a keresztnevedet!",
      email:{
        required:"Adjad meg az email cimedet!",
        minLength:"normálisat bazdmeg...",
        },
      },
    submitHandler: function(form) {
        $(form).ajaxSubmit({
        target:'#visszajelzes',
        url: 'action.php',
        type: 'POST',
        dataType: 'null',
      });
    }
  });

This code make fantastic validation event for me, its okay. But if a
post the code, the page is reload. And there is the problem. I wont
reload the page.

If I comment few lines (down) the code is working fine (posting the
datas and not reload the page). But the validation events is missing.

So I think I'm totally confused what I have to and what I haven't to
do for a normally form.
Normally form is the next: validate the input fields and posting the
datas without page reload.

  $('#probaform').validate({
//     rules:{
//       nev:"required",
//       utonev:"required",
//         email:{
//           required: true,
//           minLegth:3,
//           }
//         },
//     messages:{
//       nev:"Adjad meg a nevedet!",
//       utonev:"Adjad meg a keresztnevedet!",
//       email:{
//         required:"Adjad meg az email cimedet!",
//         minLength:"normálisat bazdmeg...",
//         },
//       },
    submitHandler: function(form) {
        $(form).ajaxSubmit({
        target:'#visszajelzes',
        url: 'action.php',
        type: 'POST',
        dataType: 'null',
      });
    }
  });

So thanks for the help and patience again :)

And sorry my english, a little bit hunglish...

András

-- 
- -
-- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
-- "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell

Reply via email to