validation plugin and remote methods not working...

validation plugin and remote methods not working...

Hello,

I'm trying check if title exist before submit the form, i think my jquery code is correct:

  1. $( "#newgoo1" ).validate({
                    rules: {
                            newtitle: {
                                    required: true,
                                    remote: '/user/inc/checktitle.php'
                            },
                            newcat: {
                                    required: true
                            },
                            __aptags_value: {
                                    required: true,
                            }
                    },











  2.             messages: {
  3.                   newtitle: {
  4.                         remote: "choose another title"
  5.                   }
  6.             }
  7. });
My php code only do a echo "false", any check is perform throught php.
  1. <?php
  2. echo "false";
  3. ?>
When i do submit, all field with required show the error "this field is required", so these plugin part is working fine.
If i see the apache log, i can see the get is doing correctly. I write "aaaa" in the input text and i see in the log:
  1.  - - [28/Feb/2011:19:40:54 +0100] "GET /user/inc/checktitle.php?callback=jQuery1509686416961440416_1298918421897&newgootitle=aaaa&_=1298918442275 HTTP/1.1" 200 24 ...
but, when i submit, i never get "choose another title".
And when always appear the "this field is required" in the newtitle label error.

What is my error ?

Thanks and regards.












    • Topic Participants

    • foros