Can you show the network requests? If the XHR doesn't return successfully 
(regardless of whether the record is deleted), the Javascript to remove the 
DIV will not be triggered.

Anthony

On Monday, May 16, 2016 at 3:15:54 PM UTC-4, Vic Ding wrote:
>
> HI Anthony,
>
> There is one mysterious 404 to the remove function, to a wrong URL which I 
> never called. However, the record is indeed successfully removed from 
> database. 
>
>
>
> On Monday, May 16, 2016 at 8:35:50 PM UTC+2, Anthony wrote:
>>
>> Your original code works for me. Are you sure the Ajax request is 
>> returning successfully (check the browser developer tools and make sure the 
>> XHR request returns with a 200 response)? Also, check for any errors in the 
>> Javascript console.
>>
>> Anthony
>>
>> On Sunday, May 15, 2016 at 11:49:34 AM UTC-4, Vic Ding wrote:
>>>
>>> Hi all,
>>>
>>> I am new to web2py. 
>>> I have a HTML helper
>>>
>>> DIV(
>>>     DIV(A('delete', callback=URL('removeProduct/'+str(row.id)), 
>>> delete='div#product'+str(row.id)), _class='delete_button'),
>>>     _class='product',
>>>     _id='product'+str(row.id)
>>> )
>>>
>>>
>>> The callback to removeProuct/id is working well, however, the actual 
>>> content is not removed after deletion. I am trying to tackle the issue by 
>>> using delete attribute as read in the online book at web2py website. It is 
>>> not working either. 
>>>
>>> Any idea? did I miss something here?
>>>
>>> Thanks!
>>>
>>> Vic
>>>
>>>

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