No david, i don't want to put the value directly in a form like they do, i 
just want to extract the value after the submit ?

Le lundi 15 mai 2017 11:17:31 UTC+2, Dave S a écrit :
>
>
>
> On Sunday, May 14, 2017 at 11:45:39 PM UTC-7, sunda...@gmail.com wrote:
>>
>> But the problem is i don't know how to "extract the value from the form", 
>> i just know how to add it to the ajax url query string ... And i also don't 
>> know how to "submit the from via ajax" 
>> Please let me know 
>>
>>
> That's what Chapter 11 is about:
> <URL:
> http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#Ajax-form-submission
> >
>
> /dps
>
>  
>
>> Le vendredi 12 mai 2017 19:09:18 UTC+2, Anthony a écrit :
>>>
>>> Your code intercepts the form submission but doesn't actually submit the 
>>> form data. You'll either have to extract the value from the form and add it 
>>> to the Ajax URL query string (using Javascript, not Python), or use 
>>> Javascript to serialize and submit the form via Ajax. You could make things 
>>> a lot easier by putting the form in an Ajax component, which will 
>>> automatically get submitted via Ajax.
>>>
>>> Anthony
>>>
>>> On Friday, May 12, 2017 at 2:55:46 AM UTC-4, sunda...@gmail.com wrote:
>>>>
>>>> But this request.vars.category, i have to ryt it in the view and then 
>>>> pass it to then action via my script, or i directly write it on the action 
>>>> ? 
>>>> Because in both case, the value he show is none ... 
>>>>
>>>> Le jeudi 11 mai 2017 15:51:36 UTC+2, sunda...@gmail.com a écrit :
>>>>>
>>>>> Hello,
>>>>>
>>>>>
>>>>> Normally and in a lot of tutorials i see the declaration of a form 
>>>>> inside the controller and onlly {{=form}} inside the view .... Sadly i am 
>>>>> working in a big website with hundred files and they did like the 
>>>>> declaration of the form with Helpers inside the view. SO, the problem is 
>>>>> that when i submit i want the value i putted inside a form. and Thanks to 
>>>>> the ajax ( this part is working and already done ) i will  pass it to the 
>>>>> controller.
>>>>> So the main question is : 
>>>>>
>>>>> {{
>>>>>     
>>>>> =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>
>>>>>
>>>>> How do i get the value of the form catefory
>>>>>
>>>>> PLZ HELP MEEE
>>>>>
>>>>

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