Hi Jörn,

Very very thanks for your advice. The problem was in the name of GET
parameter on the remote script

$request = trim(strtolower($_REQUEST[codigo]));  ----
$_REQUEST[codigo] instead $_REQUEST[value]

This problem was because in the Milk example (server side script) is
bad explained.

Best Regards.




On 27 ago, 22:50, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> Can you check if a request is made and what the response is via Firebug?
>
> In any case, a testpage would help a lot.
>
> Jörn
>
>
>
> On Wed, Aug 27, 2008 at 9:56 PM, adrianrz <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I've try to use remote method and not work.
>
> > There are the parameters
>
> > <script type="text/javascript">
> >  $(document).ready(function(){
>
> >    var validator = $("#formcode").validate({
> >        rules: {
> >         codigo: {
> >            required: true,
> >            minlength: 3,
> >             remote: "valcodigo.php"
> >            }
> >         },
> >              errorPlacement: function(error, element) {
> >                error.insertAfter(element);
> >        },
>
> >        messages: {
> >               codigo: {
> >               remote: jQuery.format("El código {0} ya existe")
> >               }
> >        },
> >        errorClass: "errores"
> >       })
> >  })
> > </script>
>
> > The form
>
> > <div id="form">
> > <form id="formcode" name="formcode" method="post" action="<? echo
> > $PHP_SELF?>?p=<?echo $modulo?>&acc=grabar" class="cmxform">
> >        <fieldset>
> >         <label for="codigo">Código</label>
> >          <input type="text" name="codigo" id="codigo" class="input" /><br />
> > </fieldset>
> > <input class="submit" type="submit" value="Grabar" />
> > </form>
>
> > The remote script
> > <?php
> > $request = trim(strtolower($_REQUEST['value']));
> > $codigo= array('A1234','B1234');
> > $valid = 'true';
> > foreach($codigo as $cod) {
> >        if( strtolower($cod) == $request ) {
> >                $valid = 'false';
> >        }
> > }
> > echo $valid;
> > ?>
>
> > required and minlenght work fine but remote don't
>
> > I've download the entire "Milk" demo and I've copy it in my local
> > server and remote method don`t work too.
>
> > Anybody help me???
>
> > Thanks
>
> > Adrian- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Reply via email to