you do an *ajax *request and *immediately * try to use ajax-results On Friday, January 27, 2017 at 5:48:59 PM UTC+3, Morganti wrote: > > Hi guys, > > I have some extra felds no auth_user. I need to complete some fields after > one filled in. > > I am able to read this field using jquery..blur and using ajax to collect > these fields from a external webservice and putting the results on hidden > div and input fiedls. Now I need to use these input fields to fill the > correct fields >
> I am using the commands: > > <script type="text/javascript"> > jQuery(document).ready(function(){ > jQuery('#auth_user_cep').blur(function(){ > ajax('{{=URL('cadastro', 'preenche_cep')}}', ['cep'], 'preenchecep'); > jQuery('#auth_user_endereco').val(jQuery('#pendereco').val()); > jQuery('#auth_user_bairro').val(jQuery('#pbairro').val()); > jQuery('#auth_user_cidade').val(jQuery('#pcidade').val()); > }); > }); > </script> > > But the auth_user fields are not being changed. If I try to execute on > console of browser, I can change them. But, by using the scricpt, no! > > Can you give some directions? > > Thanks a lot your helping. > BR > André > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.