Ok thanks a lot anthony,

I have a field form, the user have to enter inside a category, when he 
submit the category i want to take the value of the field and give it to 
the action ... this is the code in the view : 


{{
    =FORM(INPUT(_name='category',_
value='Category'),INPUT(_type='submit',_value='submit'),_id='categ')
}}


<script>
jQuery('#categ').submit(function() {
  ajax('{{=URL('categ',vars=dict(value=WAITING FOR THE VALUE))}}');
  return false;
});
</script>


when i write request.vars in the callback action i see None ... 


Le mardi 16 mai 2017 15:01:53 UTC+2, Anthony a écrit :
>
> On Tuesday, May 16, 2017 at 4:14:16 AM UTC-4, sunda...@gmail.com 
> <javascript:> wrote:
>>
>> No i can't get the value i put inside the form if i dont have a database 
>> to insert in
>>
>
> No, that's not true. The ajax() function just needs the names of fields in 
> a form and will post the values of those fields to the URL provided. The 
> action that receives that post will have the values of the fields available 
> in request.vars. None of this requires a database table or DAL model.
>
> If you need further assistance, you'll have to explain more fully what you 
> are really trying to do and show your code.
>
> Anthony
>

-- 
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.

Reply via email to