[jQuery] Re: validate with form plugin
2008/5/12 Jörn Zaefferer <[EMAIL PROTECTED]>: > > This line is broken: "minLegth:3,". The method is "minlength" and > you've got a trailing comma which screws up any non-firefox browser. > Same in your last line of ajaxSubmit "dataType: 'null',". > > Jörn Oh my God! I'm a luser... :( What is the good solution for non-firefox browsers? Thank you very much! András -- - - -- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando -- "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell
[jQuery] Re: validate with form plugin
This line is broken: "minLegth:3,". The method is "minlength" and you've got a trailing comma which screws up any non-firefox browser. Same in your last line of ajaxSubmit "dataType: 'null',". Jörn On Mon, May 12, 2008 at 11:20 AM, András Csányi <[EMAIL PROTECTED]> wrote: > 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: > > > Teszt form > a: > b: > c: > > > > $('#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 >
[jQuery] Re: validate with form plugin
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: Teszt form a: b: c: $('#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
[jQuery] Re: validate with form plugin
Hi, I used this form validation at http://www.mortgageworkout.co.uk/contact You can use on PHP validation classes, for people without javascript and other sneaky bastards ;) http://www.google.com/search?q=PHP+form+validation+class It's good to make sure that your JavaScript validation logic is the same as the PHP logic. On May 11, 1:37 pm, "András Csányi" <[EMAIL PROTECTED]> wrote: > Hi all! > > I'm new in jquery and i have a queston. Somebody knows usable example > like this to using form plugin with validate > plugin(http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-de... > > I tried 4 hours writing a working code, but i have failed (and i'm > tired and nervos). I'm better in php and sql. Javascript isn't my > favorite language. > > Thanks for the help and patience! > > András > > -- > - - > -- Csanyi Andras --http://sayusi.hu-- Sayusi Ando > -- "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell
[jQuery] Re: validate with form plugin
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 On Sun, May 11, 2008 at 2:37 PM, András Csányi <[EMAIL PROTECTED]> wrote: > Hi all! > > I'm new in jquery and i have a queston. Somebody knows usable example > like this to using form plugin with validate > plugin(http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-demo.html)? > > I tried 4 hours writing a working code, but i have failed (and i'm > tired and nervos). I'm better in php and sql. Javascript isn't my > favorite language. > > Thanks for the help and patience! > > András > > -- > - - > -- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando > -- "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell >